home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / util / misc / ReportPlus.lha / reportplus / source / f1.c < prev    next >
Encoding:
C/C++ Source or Header  |  2002-08-23  |  104.8 KB  |  2,575 lines

  1. #include <exec/types.h>
  2. #include <exec/memory.h>
  3. #include <proto/exec.h>
  4. #include <intuition/intuition.h>
  5. #include <intuition/gadgetclass.h>
  6. #include <proto/intuition.h>
  7. #include <libraries/gadtools.h>
  8. #include <proto/gadtools.h>
  9. #include <dos/dos.h>
  10. #include <proto/dos.h>
  11. #include <graphics/gfx.h>
  12. #include <clib/graphics_protos.h>
  13.  
  14. #include <clib/alib_protos.h>
  15. #include <ctype.h>
  16. #include <stdlib.h>
  17. #include <string.h>
  18. #include "rp.h"
  19.  
  20. #define ALL_REACTION_CLASSES
  21. #include <reaction/reaction.h>
  22. #include <clib/texteditor_protos.h>
  23. #include <gadgets/texteditor.h>
  24. #include <pragmas/texteditor_pragmas.h>
  25. #include <gadgets/chooser.h>
  26. #include <pragmas/chooser_pragmas.h>
  27.  
  28. #define SUBSYSTEMS   128 // counting from 0
  29. #define CPUS           4 // counting from 0
  30. #define MODELS        13 // counting from 0
  31. #define AGNUSES        4 // counting from 0
  32. #define MAXELEMENTS_1  4 // counting from 0
  33.  
  34. MODULE void refreshpv(void);
  35. MODULE void updatereportgadgets(void);
  36. MODULE void readreportgadgets(void);
  37. MODULE ULONG Hook1Func(struct Hook *h, VOID *o, VOID *msg);
  38. MODULE void updateemail(void);
  39.  
  40. AGLOBAL struct ReportStruct report;
  41.  
  42. MODULE struct Gadget*  report_gadgets[GIDS_1 + 1];
  43. MODULE ABOOL           SubsystemNodes = FALSE;
  44. MODULE struct List     SubsystemList;
  45.  
  46. MODULE struct
  47. {   STRPTR friendly;
  48.     STRPTR unfriendly;
  49. } subsystems[SUBSYSTEMS + 1] =
  50. {   {"3D Look",                "new.look"        },
  51.     {"A590",                   "A2091.A590"      },
  52.     {"A2013",                  "A2013"           },
  53.     {"A2065",                  "A2065"           },
  54.     {"A2090",                  "A2090.A2090A"    },
  55.     {"A2090A",                 "A2090.A2090A"    },
  56.     {"A2091",                  "A2091"           },
  57.     {"A2232",                  "A2232"           },
  58.     {"A2300",                  "A2300"           },
  59.     {"A2410",                  "A2410"           },
  60.     {"A2620",                  "A2620"           },
  61.     {"A2630",                  "A2630"           },
  62.     {"A3000",                  "A3000"           },
  63.     {"A4091",                  "A4091"           },
  64.     {"AmigaBASIC",             "AmigaBasic"      },
  65.     {"AGA chipset",            "aa.chips"        },
  66.     {"ALink",                  "alink"           },
  67.     {"amiga.lib",              "amiga.lib"       },
  68.     {"AmigaGuide",             "amigaguide"      },
  69.     {"AmigaTerm",              "amigaterm"       },
  70.     {"AmigaVision",            "amigavision"     },
  71.     {"AppShell",               "appshell"        },
  72.     {"ARexx",                  "arexx"           },
  73.     {"Art",                    "art"             },
  74.     {"AS225",                  "as225"           },
  75.     {"ASL.library",            "asl.library"     },
  76.     {"audio.device",           "audio.device"    },
  77.     {"AUTOCONFIG",             "autoconfig"      },
  78.     {"Battery-backed clock",   "battclock"       },
  79.     {"Battery-backed memory",  "battmem"         },
  80.     {"Bootstrap",              "strap"           },
  81.     {"BridgeBoard",            "bridgeboard"     },
  82.     {"BRU",                    "bru"             },
  83.     {"bullet.library",         "bullet"          },
  84.     {"C: programs",            "cdos.command"    },
  85.     {"CD.device",              "cd.device"       },
  86.     {"CD32 hardware",          "cdgs"            },
  87.     {"CDFileSystem",           "cdfilesystem"    },
  88.     {"CDTV",                   "cdtv"            },
  89.     {"CDTV.device",            "cdtv.device"     },
  90.     {"cdui",                   "cdui"            },
  91.     {"CIA.resource",           "cia.resource"    },
  92.     {"CLI",                    "shell"           },
  93.     {"clipboard.device",       "clipboard"       },
  94.     {"Commodities",            "commodities"     },
  95.     {"CON-Handler",            "con-handler"     },
  96.     {"console.device",         "console.device"  },
  97.     {"Custom chipset",         "custom.chips"    },
  98.     {"Datatypes",              "datatypes"       },
  99.     {"debug.lib",              "debug.lib"       },
  100.     {"Developer support",      "devsupport"      },
  101.     {"disk.resource",          "disk.resource"   },
  102.     {"diskfont.library",       "diskfont"        },
  103.     {"DOS.library",            "dos.library"     },
  104.     {"Early Startup Control",  "bootmenu"        },
  105.     {"Envoy",                  "envoy"           },
  106.     {"Exec.library",           "exec"            },
  107.     {"expansion.library",      "expansion"       },
  108.     {"filesystem",             "filesystem"      },
  109.     {"filesystem.resource",    "filesysres"      },
  110.     {"Fonts",                  "fonts"           },
  111.     {"Fountain",               "fountain"        },
  112.     {"gadget.classes",         "gadget.classes"  },
  113.     {"GadTools.library",       "gadtools"        },
  114.     {"gameport.device",        "gameport"        },
  115.     {"Genlock",                "genlock"         },
  116.     {"Graphics",               "graphics"        },
  117.     {"Hardware",               "hardware"        },
  118.     {"HDBackup",               "hdbackup"        },
  119.     {"HDToolBox",              "hdtoolbox"       },
  120.     {"icon.library",           "icon.library"    },
  121.     {"IconEdit",               "iconedit"        },
  122.     {"IDE.device",             "ide.device"      },
  123.     {"IFFParse.library",       "iffparse"        },
  124.     {"input.device",           "input.device"    },
  125.     {"Installer",              "installer"       },
  126.     {"IntelliFont",            "fountain"        },
  127.     {"Intuition.library",      "intuition"       },
  128.     {"IPrefs",                 "iprefs"          },
  129.     {"Keyboard",               "keyboard"        },
  130.     {"keymap.library",         "keymap"          },
  131.     {"Keymaps",                "keymaps"         },
  132.     {"layers.library",         "layers"          },
  133.     {"locale.library",         "locale.library"  },
  134.     {"lowlevel.library",       "lowlevel"        },
  135.     {"Maths: FFP",             "mathffp"         },
  136.     {"Maths: IEEE Double Precision", "mathieeedoub"    },
  137.     {"Maths: IEEE Single Precision", "mathieeesing"    },
  138.     {"Maths: IEEE",            "mathieee"        },
  139.     {"MicroEMACS",             "microemacs"      },
  140.     {"Monitors",               "monitors"        },
  141.     {"MultiView",              "multiview"       },
  142.     {"nonvolatile",            "nonvolatile"     },
  143.     {"parallel.device",        "parallel.device" },
  144.     {"PCMCIA",                 "creditcard"      },
  145.     {"PORT-Handler",           "port-handler"    },
  146.     {"potgo.resource",         "potgo.resource"  },
  147.     {"Preferences",            "preferences"     },
  148.     {"Printer drivers",        "printer.driver"  },
  149.     {"printer.device",         "printer.device"  },
  150.     {"QUEUE-Handler",          "queue-handler"   },
  151.     {"RAM-Handler",            "ram-handler"     },
  152.     {"ramlib",                 "ramlib"          },
  153.     {"realtime",               "realtime"        },
  154.     {"Report+",                "report+"         },
  155.     {"Resources",              "resource"        },
  156.     {"ROM Kernel Manuals",     "rkm"             },
  157.     {"ROMWack",                "wack"            },
  158.     {"Saga: Age of Heroes",    "saga"            },
  159.     {"SANA-2",                 "sana2"           },
  160.     {"Scripts",                "script"          },
  161.     {"SCSI.device",            "scsi.device"     },
  162.     {"serial.device",          "serial.device"   },
  163.     {"Shell",                  "shell"           },
  164.     {"Startup",                "startup"         },
  165.     {"System/ programs",       "system.command"  },
  166.     {"TCP/IP",                 "as225"           },
  167.     {"timer.device",           "timer.device"    },
  168.     {"ToolMaker",              "toolmaker"       },
  169.     {"Tools/ programs",        "tools"           },
  170.     {"trackdisk.device",       "trackdisk"       },
  171.     {"UNIX",                   "unix"            },
  172.     {"Unsure",                 ""                },
  173.     {"User manuals",           "userdocs"        },
  174.     {"Utilities/ programs",    "util.command"    },
  175.     {"utility.library",        "utility.library" },
  176.     {"Wack",                   "wack"            },
  177.     {"Workbench",              "workbench"       },
  178.     {"Worm Wars",              "wormwars"        }
  179. };
  180. MODULE STRPTR TypeOptions[4] =
  181. {   "System Software/Hardware Bug",
  182.     "3rd Party Product Compatibility",
  183.     "Enhancement Request",
  184.     NULL
  185. };
  186. MODULE STRPTR SeverityOptions[5] =
  187. {   (STRPTR) "Crashes, hangs or corrupts data",
  188.     (STRPTR) "Behaves incorrectly",
  189.     (STRPTR) "Cosmetic problem",
  190.     (STRPTR) "Works correctly",
  191.     NULL
  192. };
  193. MODULE STRPTR AgnusOptions[AGNUSES + 2] =
  194. {   (STRPTR) "AGA",
  195.     (STRPTR) "ECS PAL",
  196.     (STRPTR) "ECS NTSC",
  197.     (STRPTR) "OCS PAL",
  198.     (STRPTR) "OCS NTSC",
  199.     NULL
  200. };
  201. MODULE STRPTR CPUOptions[CPUS + 2] =
  202. {   (STRPTR) "68020",
  203.     (STRPTR) "68030",
  204.     (STRPTR) "68040",
  205.     (STRPTR) "68060",
  206.     (STRPTR) "PowerPC",
  207.     NULL
  208. };
  209. MODULE STRPTR ModelOptions[MODELS + 2] =
  210. {   (STRPTR) "A500",
  211.     (STRPTR) "A500+",
  212.     (STRPTR) "A600",
  213.     (STRPTR) "A1000",
  214.     (STRPTR) "A1200",
  215.     (STRPTR) "A1500",
  216.     (STRPTR) "A2000",
  217.     (STRPTR) "A2500",
  218.     (STRPTR) "A3000",
  219.     (STRPTR) "A4000",
  220.     (STRPTR) "CDTV",
  221.     (STRPTR) "CD32",
  222.     (STRPTR) "DraCo",
  223.     (STRPTR) "Emulator",
  224.     NULL
  225. };
  226.  
  227. IMPORT ULONG               fillcolour, offset;
  228. IMPORT TEXT                aslresult[PATHNAMEFIELD + 1],
  229.                            weekdaystring[10],
  230.                            datestring[10],
  231.                            timestring[9],
  232.                            cpuline[VLONGFIELD + 1];
  233. IMPORT struct SharedStruct shared;
  234. IMPORT TEXT                IOBuffer[LONGESTFIELD + 1];
  235. IMPORT SBYTE               page;
  236. IMPORT ABOOL               certified, fillwindows;
  237. IMPORT TEXT                string[PATHNAMEFIELD + 1];
  238. IMPORT struct Window*      MainWindowPtr;
  239. IMPORT struct Menu*        MenuPtr;
  240. IMPORT struct Screen*      ScreenPtr;
  241. IMPORT struct Library*     TextEditorBase;
  242. IMPORT Object*             WinObject[FUNCTIONS + 1];
  243. IMPORT struct VisualInfo*  VisualInfoPtr;
  244.  
  245. /* report.textfield[] are:
  246.    0: brief bug description
  247.    1: bug generation procedure or example
  248.    2: if this works differently on other versions or hardware, explain
  249.    3: what developer is doing in that area of HW or SW
  250.    4: related problems
  251.    5: enhancement request */
  252.  
  253. AGLOBAL void report1(void)
  254. {   struct Hook Hook1Struct;
  255.  
  256.     InitHook(&Hook1Struct, Hook1Func, NULL);
  257.  
  258.     /* Create the window object. */
  259.     lockscreen();
  260.  
  261. if (!(WinObject[1] =
  262. NewObject
  263. (   WINDOW_GetClass(),                    NULL,
  264.     WA_PubScreen,                         ScreenPtr,
  265.     WA_ScreenTitle,                       "Report+",
  266.     WA_Title,                             "Report+: Bug Report Editor (Page 1 of 2)",
  267.     WA_Activate,                          TRUE,
  268.     WA_DepthGadget,                       TRUE,
  269.     WA_DragBar,                           TRUE,
  270.     WA_CloseGadget,                       TRUE,
  271.     WA_SizeGadget,                        TRUE,
  272.     WA_IDCMP,                             IDCMP_RAWKEY,
  273.     WINDOW_IDCMPHook,                     &Hook1Struct,
  274.     WINDOW_IDCMPHookBits,                 IDCMP_RAWKEY,
  275.     WINDOW_MenuStrip,                     MenuPtr,
  276.     WINDOW_Position,                      WPOS_CENTERSCREEN,
  277.     WINDOW_ParentGroup,                   report_gadgets[GID_1_LY2] =
  278.     NewObject
  279.     (   LAYOUT_GetClass(),                NULL,
  280.         LAYOUT_Orientation,               LAYOUT_ORIENT_VERT,
  281.         LAYOUT_SpaceOuter,                TRUE,
  282.         LAYOUT_DeferLayout,               TRUE,
  283.         LAYOUT_AddChild,
  284.         NewObject
  285.         (   LAYOUT_GetClass(),            NULL,
  286.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  287.             LAYOUT_SpaceOuter,            TRUE,
  288.             LAYOUT_DeferLayout,           TRUE,
  289.             LAYOUT_BevelStyle,            BVS_NONE,
  290.             LAYOUT_AddChild,
  291.             NewObject
  292.             (   LAYOUT_GetClass(),    NULL,
  293.                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  294.                 LAYOUT_SpaceOuter,    TRUE,
  295.                 LAYOUT_DeferLayout,   TRUE,
  296.                 LAYOUT_VertAlignment, LALIGN_CENTER,
  297.                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  298.                 LAYOUT_BevelStyle,    BVS_NONE,
  299.                 LAYOUT_AddImage,
  300.                 NewObject
  301.                 (   LABEL_GetClass(),     NULL,
  302.                     LABEL_Text,           "_Summary:",
  303.                     LABEL_Justification,  LJ_RIGHT,
  304.                 TAG_END),
  305.             TAG_END),
  306.             CHILD_WeightedWidth,      30,
  307.             CHILD_MinWidth,           180,
  308.             LAYOUT_AddChild,          report_gadgets[GID_1_ST1] =
  309.             NewObject
  310.             (   STRING_GetClass(),    NULL,
  311.                 GA_ID,                GID_1_ST1,
  312.                 GA_TabCycle,          TRUE,
  313.                 GA_RelVerify,         TRUE,
  314.                 STRINGA_TextVal,      report.summary,
  315.                 STRINGA_MinVisible,   15,
  316.                 STRINGA_MaxChars,     LONGFIELD,
  317.             TAG_END),
  318.             CHILD_WeightedWidth,      70,
  319.             CHILD_MinWidth,           420,
  320.         TAG_END),
  321.         CHILD_WeightedHeight,         0,
  322.         LAYOUT_AddChild,
  323.         NewObject
  324.         (   LAYOUT_GetClass(),            NULL,
  325.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  326.             LAYOUT_SpaceOuter,            TRUE,
  327.             LAYOUT_DeferLayout,           TRUE,
  328.             LAYOUT_BevelStyle,            BVS_NONE,
  329.             LAYOUT_AddChild,
  330.             NewObject
  331.             (   LAYOUT_GetClass(),        NULL,
  332.                 LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  333.                 LAYOUT_SpaceOuter,        TRUE,
  334.                 LAYOUT_DeferLayout,       TRUE,
  335.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  336.                 LAYOUT_HorizAlignment,    LALIGN_CENTER,
  337.                 LAYOUT_BevelStyle,        BVS_NONE,
  338.                 LAYOUT_AddImage,
  339.                 NewObject
  340.                 (   LABEL_GetClass(),     NULL,
  341.                     LABEL_Text,           "Email to:",
  342.                     LABEL_Justification,  LJ_RIGHT,
  343.                 TAG_END),
  344.             TAG_END),
  345.             CHILD_WeightedWidth,      30,
  346.             CHILD_MinWidth,           180,
  347.             LAYOUT_AddChild,          report_gadgets[GID_1_ST2] =
  348.             NewObject
  349.             (   STRING_GetClass(),    NULL,
  350.                 GA_ID,                GID_1_ST2,
  351.                 STRINGA_TextVal,      "",
  352.                 GA_ReadOnly,          TRUE,
  353.             TAG_END),
  354.             CHILD_WeightedWidth,      70,
  355.             CHILD_MinWidth,           420,
  356.         TAG_END),
  357.         CHILD_WeightedHeight,         0,
  358.         LAYOUT_AddChild,
  359.         NewObject
  360.         (   LAYOUT_GetClass(),            NULL,
  361.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  362.             LAYOUT_SpaceOuter,            TRUE,
  363.             LAYOUT_DeferLayout,           TRUE,
  364.             LAYOUT_BevelStyle,            BVS_NONE,
  365.             LAYOUT_AddChild,
  366.             NewObject
  367.             (   LAYOUT_GetClass(),        NULL,
  368.                 LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  369.                 LAYOUT_SpaceOuter,        TRUE,
  370.                 LAYOUT_DeferLayout,       TRUE,
  371.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  372.                 LAYOUT_HorizAlignment,    LALIGN_CENTER,
  373.                 LAYOUT_BevelStyle,        BVS_NONE,
  374.                 LAYOUT_AddImage,
  375.                 NewObject
  376.                 (   LABEL_GetClass(),     NULL,
  377.                     LABEL_Text,           "_Type:",
  378.                     LABEL_Justification,  LJ_RIGHT,
  379.                 TAG_END),
  380.             TAG_END),
  381.             CHILD_WeightedWidth,      30,
  382.             CHILD_MinWidth,           180,
  383.             LAYOUT_AddChild,          report_gadgets[GID_1_CH1] =
  384.             NewObject
  385.             (   CHOOSER_GetClass(),   NULL,
  386.                 GA_ID,                GID_1_CH1,
  387.                 GA_RelVerify,         TRUE, // otherwise we won't hear the gadget
  388.                 CHOOSER_PopUp,        TRUE,
  389.                 CHOOSER_LabelArray,   TypeOptions,
  390.                 CHOOSER_Selected,     (WORD) report.type,
  391.             TAG_END),
  392.             CHILD_WeightedWidth,      70,
  393.             CHILD_MinWidth,           420,
  394.         TAG_END),
  395.         CHILD_WeightedHeight,         0,
  396.         LAYOUT_AddChild,
  397.         NewObject
  398.         (   LAYOUT_GetClass(),            NULL,
  399.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  400.             LAYOUT_SpaceOuter,            TRUE,
  401.             LAYOUT_DeferLayout,           TRUE,
  402.             LAYOUT_BevelStyle,            BVS_NONE,
  403.             LAYOUT_AddChild,
  404.             NewObject
  405.             (   LAYOUT_GetClass(),        NULL,
  406.                 LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  407.                 LAYOUT_SpaceOuter,        TRUE,
  408.                 LAYOUT_DeferLayout,       TRUE,
  409.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  410.                 LAYOUT_HorizAlignment,    LALIGN_CENTER,
  411.                 LAYOUT_BevelStyle,        BVS_NONE,
  412.                 LAYOUT_AddImage,
  413.                 NewObject
  414.                 (   LABEL_GetClass(),     NULL,
  415.                     LABEL_Text,           "Severit_y:",
  416.                     LABEL_Justification,  LJ_RIGHT,
  417.                 TAG_END),
  418.             TAG_END),
  419.             CHILD_WeightedWidth,      30,
  420.             CHILD_MinWidth,           180,
  421.             LAYOUT_AddChild,          report_gadgets[GID_1_CH2] =
  422.             NewObject
  423.             (   CHOOSER_GetClass(),   NULL,
  424.                 GA_ID,                GID_1_CH2,
  425.                 GA_RelVerify,         TRUE, // otherwise we won't hear the gadget
  426.                 CHOOSER_PopUp,        TRUE,
  427.                 CHOOSER_LabelArray,   SeverityOptions,
  428.                 CHOOSER_Selected,     (WORD) report.severity,
  429.             TAG_END),
  430.             CHILD_WeightedWidth,      70,
  431.             CHILD_MinWidth,           420,
  432.         TAG_END),
  433.         CHILD_WeightedHeight,         0,
  434.         LAYOUT_AddChild,
  435.         NewObject
  436.         (   LAYOUT_GetClass(),            NULL,
  437.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  438.             LAYOUT_SpaceOuter,            TRUE,
  439.             LAYOUT_DeferLayout,           TRUE,
  440.             LAYOUT_BevelStyle,            BVS_NONE,
  441.             LAYOUT_AddChild,
  442.             NewObject
  443.             (   LAYOUT_GetClass(),        NULL,
  444.                 LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  445.                 LAYOUT_SpaceOuter,        TRUE,
  446.                 LAYOUT_DeferLayout,       TRUE,
  447.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  448.                 LAYOUT_HorizAlignment,    LALIGN_CENTER,
  449.                 LAYOUT_BevelStyle,        BVS_NONE,
  450.                 LAYOUT_AddImage,
  451.                 NewObject
  452.                 (   LABEL_GetClass(),     NULL,
  453.                     LABEL_Text,           "_Debug tools/wedges:",
  454.                     LABEL_Justification,  LJ_RIGHT,
  455.                 TAG_END),
  456.             TAG_END),
  457.             CHILD_WeightedWidth,      30,
  458.             CHILD_MinWidth,           180,
  459.             LAYOUT_AddChild,          report_gadgets[GID_1_ST3] =
  460.             NewObject
  461.             (   STRING_GetClass(),    NULL,
  462.                 GA_ID,                GID_1_ST3,
  463.                 GA_TabCycle,          TRUE,
  464.                 GA_RelVerify,         TRUE,
  465.                 STRINGA_TextVal,      report.debug,
  466.                 STRINGA_MinVisible,   15,
  467.                 STRINGA_MaxChars,     LONGFIELD,
  468.             TAG_END),
  469.             CHILD_WeightedWidth,      70,
  470.             CHILD_MinWidth,           420,
  471.         TAG_END),
  472.         CHILD_WeightedHeight,         0,
  473.         LAYOUT_AddChild,
  474.         NewObject
  475.         (   LAYOUT_GetClass(),            NULL,
  476.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  477.             LAYOUT_SpaceOuter,            TRUE,
  478.             LAYOUT_DeferLayout,           TRUE,
  479.             LAYOUT_BevelStyle,            BVS_NONE,
  480.             LAYOUT_AddChild,
  481.             NewObject
  482.             (   LAYOUT_GetClass(),        NULL,
  483.                 LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  484.                 LAYOUT_SpaceOuter,        TRUE,
  485.                 LAYOUT_DeferLayout,       TRUE,
  486.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  487.                 LAYOUT_HorizAlignment,    LALIGN_CENTER,
  488.                 LAYOUT_BevelStyle,        BVS_NONE,
  489.                 LAYOUT_AddImage,
  490.                 NewObject
  491.                 (   LABEL_GetClass(),     NULL,
  492.                     LABEL_Text,           "_Program pathname:",
  493.                     LABEL_Justification,  LJ_RIGHT,
  494.                 TAG_END),
  495.             TAG_END),
  496.             CHILD_WeightedWidth,      30,
  497.             CHILD_MinWidth,           180,
  498.             LAYOUT_AddChild,
  499.             NewObject
  500.             (   LAYOUT_GetClass(),    NULL,
  501.                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  502.                 LAYOUT_SpaceOuter,    TRUE,
  503.                 LAYOUT_DeferLayout,   TRUE,
  504.                 LAYOUT_BevelStyle,    BVS_NONE,
  505.                 LAYOUT_AddChild,      report_gadgets[GID_1_ST7] =
  506.                 NewObject
  507.                 (   STRING_GetClass(),NULL,
  508.                     GA_ID,            GID_1_ST7,
  509.                     GA_TabCycle,      TRUE,
  510.                     STRINGA_TextVal,  report.pp,
  511.                     STRINGA_MaxChars, PATHNAMEFIELD,
  512.                 TAG_END),
  513.                 LAYOUT_AddChild,      report_gadgets[GID_1_BU4] =
  514.                 NewObject
  515.                 (   NULL,             "button.gadget",
  516.                     GA_ID,            GID_1_BU4,
  517.                     GA_RelVerify,     TRUE,
  518.                     BUTTON_AutoButton,BAG_POPFILE,
  519.                 TAG_END),
  520.                 CHILD_WeightedWidth,  0,
  521.             TAG_END),
  522.             CHILD_WeightedWidth,      70,
  523.             CHILD_MinWidth,           420,
  524.         TAG_END),
  525.         CHILD_WeightedHeight,         0,
  526.         LAYOUT_AddChild,
  527.         NewObject
  528.         (   LAYOUT_GetClass(),    NULL,
  529.             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  530.             LAYOUT_SpaceOuter,    TRUE,
  531.             LAYOUT_DeferLayout,   TRUE,
  532.             LAYOUT_BevelStyle,    BVS_NONE,
  533.             LAYOUT_AddChild,
  534.             NewObject
  535.             (   LAYOUT_GetClass(),    NULL,
  536.                 LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  537.                 LAYOUT_SpaceOuter,    TRUE,
  538.                 LAYOUT_DeferLayout,   TRUE,
  539.                 LAYOUT_BevelStyle,    BVS_NONE,
  540.                 LAYOUT_AddChild,
  541.                 NewObject
  542.                 (   LAYOUT_GetClass(),    NULL,
  543.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  544.                     LAYOUT_SpaceOuter,    TRUE,
  545.                     LAYOUT_DeferLayout,   TRUE,
  546.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  547.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  548.                     LAYOUT_BevelStyle,    BVS_NONE,
  549.                     LAYOUT_AddImage,
  550.                     NewObject
  551.                     (   LABEL_GetClass(),     NULL,
  552.                         LABEL_Text,           "Versions:",
  553.                         LABEL_Justification,  LJ_RIGHT,
  554.                     TAG_END),
  555.                 TAG_END),
  556.                 CHILD_WeightedHeight,      0,
  557.                 LAYOUT_AddChild,
  558.                 NewObject
  559.                 (   LAYOUT_GetClass(),    NULL,
  560.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  561.                     LAYOUT_SpaceOuter,    TRUE,
  562.                     LAYOUT_DeferLayout,   TRUE,
  563.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  564.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  565.                     LAYOUT_BevelStyle,    BVS_FIELD,
  566.                     LAYOUT_AddChild,
  567.                     NewObject
  568.                     (   LAYOUT_GetClass(),    NULL,
  569.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  570.                         LAYOUT_SpaceOuter,    TRUE,
  571.                         LAYOUT_DeferLayout,   TRUE,
  572.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  573.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  574.                         LAYOUT_BevelStyle,    BVS_NONE,
  575.                         LAYOUT_AddChild,
  576.                         NewObject
  577.                         (   LAYOUT_GetClass(),    NULL,
  578.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  579.                             LAYOUT_SpaceOuter,    TRUE,
  580.                             LAYOUT_DeferLayout,   TRUE,
  581.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  582.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  583.                             LAYOUT_BevelStyle,    BVS_NONE,
  584.                             LAYOUT_AddImage,
  585.                             NewObject
  586.                             (   LABEL_GetClass(),     NULL,
  587.                                 LABEL_Text,           "_KS:",
  588.                                 LABEL_Justification,  LJ_RIGHT,
  589.                             TAG_END),
  590.                         TAG_END),
  591.                         LAYOUT_AddChild,
  592.                         NewObject
  593.                         (   LAYOUT_GetClass(),    NULL,
  594.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  595.                             LAYOUT_SpaceOuter,    TRUE,
  596.                             LAYOUT_DeferLayout,   TRUE,
  597.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  598.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  599.                             LAYOUT_BevelStyle,    BVS_NONE,
  600.                             LAYOUT_AddImage,
  601.                             NewObject
  602.                             (   LABEL_GetClass(),     NULL,
  603.                                 LABEL_Text,           "_WB:",
  604.                                 LABEL_Justification,  LJ_RIGHT,
  605.                             TAG_END),
  606.                         TAG_END),
  607.                         LAYOUT_AddChild,
  608.                         NewObject
  609.                         (   LAYOUT_GetClass(),    NULL,
  610.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  611.                             LAYOUT_SpaceOuter,    TRUE,
  612.                             LAYOUT_DeferLayout,   TRUE,
  613.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  614.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  615.                             LAYOUT_BevelStyle,    BVS_NONE,
  616.                             LAYOUT_AddImage,
  617.                             NewObject
  618.                             (   LABEL_GetClass(),     NULL,
  619.                                 LABEL_Text,           "Pr_ogram:",
  620.                                 LABEL_Justification,  LJ_RIGHT,
  621.                             TAG_END),
  622.                         TAG_END),
  623.                     TAG_END),
  624.                     LAYOUT_AddChild,
  625.                     NewObject
  626.                     (   LAYOUT_GetClass(),    NULL,
  627.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  628.                         LAYOUT_SpaceOuter,    TRUE,
  629.                         LAYOUT_DeferLayout,   TRUE,
  630.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  631.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  632.                         LAYOUT_BevelStyle,    BVS_NONE,
  633.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST4] =
  634.                         NewObject
  635.                         (   STRING_GetClass(),    NULL,
  636.                             GA_ID,                GID_1_ST4,
  637.                             GA_TabCycle,          TRUE,
  638.                             GA_RelVerify,         TRUE,
  639.                             STRINGA_TextVal,      report.ks,
  640.                             STRINGA_MinVisible,   3,
  641.                             STRINGA_MaxChars,     6,
  642.                         TAG_END),
  643.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST5] =
  644.                         NewObject
  645.                         (   STRING_GetClass(),    NULL,
  646.                             GA_ID,                GID_1_ST5,
  647.                             GA_TabCycle,          TRUE,
  648.                             GA_RelVerify,         TRUE,
  649.                             STRINGA_TextVal,      report.wb,
  650.                             STRINGA_MinVisible,   3,
  651.                             STRINGA_MaxChars,     6,
  652.                         TAG_END),
  653.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST6] =
  654.                         NewObject
  655.                         (   STRING_GetClass(),    NULL,
  656.                             GA_ID,                GID_1_ST6,
  657.                             GA_TabCycle,          TRUE,
  658.                             GA_RelVerify,         TRUE,
  659.                             STRINGA_TextVal,      report.pv,
  660.                             STRINGA_MinVisible,   3,
  661.                             STRINGA_MaxChars,     LONGFIELD,
  662.                         TAG_END),
  663.                     TAG_END),
  664.                 TAG_END),
  665.                 CHILD_WeightedHeight,     0,
  666.                 LAYOUT_AddChild,
  667.                 NewObject
  668.                 (   LAYOUT_GetClass(),    NULL,
  669.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  670.                     LAYOUT_SpaceOuter,    TRUE,
  671.                     LAYOUT_DeferLayout,   TRUE,
  672.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  673.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  674.                     LAYOUT_BevelStyle,    BVS_NONE,
  675.                     LAYOUT_AddImage,
  676.                     NewObject
  677.                     (   LABEL_GetClass(),     NULL,
  678.                         LABEL_Text,           "Subsystem:",
  679.                         LABEL_Justification,  LJ_RIGHT,
  680.                     TAG_END),
  681.                 TAG_END),
  682.                 CHILD_WeightedHeight,      0,
  683.                 LAYOUT_AddChild,           report_gadgets[GID_1_LB1] =
  684.                 NewObject
  685.                 (   LISTBROWSER_GetClass(),NULL,
  686.                     GA_ID,                 GID_1_LB1,
  687.                     GA_RelVerify,          TRUE,
  688.                     LISTBROWSER_Selected,  report.subsystem,
  689.                     LISTBROWSER_Labels,    (ULONG) &SubsystemList,
  690.                     LISTBROWSER_MinVisible,3,
  691.                     LISTBROWSER_ShowSelected,TRUE,
  692.                 TAG_END),
  693.             TAG_END),
  694.             CHILD_WeightedWidth,      30,
  695.             CHILD_MinWidth,           160,
  696.             LAYOUT_AddChild,
  697.             NewObject
  698.             (   LAYOUT_GetClass(),    NULL,
  699.                 LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  700.                 LAYOUT_SpaceOuter,    TRUE,
  701.                 LAYOUT_DeferLayout,   TRUE,
  702.                 LAYOUT_BevelStyle,    BVS_NONE,
  703.                 LAYOUT_AddChild,
  704.                 NewObject
  705.                 (   LAYOUT_GetClass(),    NULL,
  706.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  707.                     LAYOUT_SpaceOuter,    TRUE,
  708.                     LAYOUT_DeferLayout,   TRUE,
  709.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  710.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  711.                     LAYOUT_BevelStyle,    BVS_NONE,
  712.                     LAYOUT_AddImage,
  713.                     NewObject
  714.                     (   LABEL_GetClass(),     NULL,
  715.                         LABEL_Text,           "3rd Party Product:",
  716.                         LABEL_Justification,  LJ_RIGHT,
  717.                     TAG_END),
  718.                 TAG_END),
  719.                 CHILD_WeightedHeight,      0,
  720.                 LAYOUT_AddChild,
  721.                 NewObject
  722.                 (   LAYOUT_GetClass(),    NULL,
  723.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  724.                     LAYOUT_SpaceOuter,    TRUE,
  725.                     LAYOUT_DeferLayout,   TRUE,
  726.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  727.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  728.                     LAYOUT_BevelStyle,    BVS_FIELD,
  729.                     LAYOUT_AddChild,
  730.                     NewObject
  731.                     (   LAYOUT_GetClass(),    NULL,
  732.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  733.                         LAYOUT_SpaceOuter,    TRUE,
  734.                         LAYOUT_DeferLayout,   TRUE,
  735.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  736.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  737.                         LAYOUT_BevelStyle,    BVS_NONE,
  738.                         LAYOUT_AddChild,
  739.                         NewObject
  740.                         (   LAYOUT_GetClass(),    NULL,
  741.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  742.                             LAYOUT_SpaceOuter,    TRUE,
  743.                             LAYOUT_DeferLayout,   TRUE,
  744.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  745.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  746.                             LAYOUT_BevelStyle,    BVS_NONE,
  747.                             LAYOUT_AddImage,
  748.                             NewObject
  749.                             (   LABEL_GetClass(),     NULL,
  750.                                 LABEL_Text,           "Manufactu_rer:",
  751.                                 LABEL_Justification,  LJ_RIGHT,
  752.                             TAG_END),
  753.                         TAG_END),
  754.                         LAYOUT_AddChild,
  755.                         NewObject
  756.                         (   LAYOUT_GetClass(),    NULL,
  757.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  758.                             LAYOUT_SpaceOuter,    TRUE,
  759.                             LAYOUT_DeferLayout,   TRUE,
  760.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  761.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  762.                             LAYOUT_BevelStyle,    BVS_NONE,
  763.                             LAYOUT_AddImage,
  764.                             NewObject
  765.                             (   LABEL_GetClass(),     NULL,
  766.                                 LABEL_Text,           "N_ame:",
  767.                                 LABEL_Justification,  LJ_RIGHT,
  768.                             TAG_END),
  769.                         TAG_END),
  770.                         LAYOUT_AddChild,
  771.                         NewObject
  772.                         (   LAYOUT_GetClass(),    NULL,
  773.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  774.                             LAYOUT_SpaceOuter,    TRUE,
  775.                             LAYOUT_DeferLayout,   TRUE,
  776.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  777.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  778.                             LAYOUT_BevelStyle,    BVS_NONE,
  779.                             LAYOUT_AddImage,
  780.                             NewObject
  781.                             (   LABEL_GetClass(),     NULL,
  782.                                 LABEL_Text,           "_Version:",
  783.                                 LABEL_Justification,  LJ_RIGHT,
  784.                             TAG_END),
  785.                         TAG_END),
  786.                     TAG_END),
  787.                     LAYOUT_AddChild,
  788.                     NewObject
  789.                     (   LAYOUT_GetClass(),    NULL,
  790.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  791.                         LAYOUT_SpaceOuter,    TRUE,
  792.                         LAYOUT_DeferLayout,   TRUE,
  793.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  794.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  795.                         LAYOUT_BevelStyle,    BVS_NONE,
  796.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST8] =
  797.                         NewObject
  798.                         (   STRING_GetClass(),    NULL,
  799.                             GA_ID,                GID_1_ST8,
  800.                             GA_TabCycle,          TRUE,
  801.                             GA_RelVerify,         TRUE,
  802.                             STRINGA_TextVal,      report.thirdmanuf,
  803.                             STRINGA_MaxChars,     MEDFIELD,
  804.                             STRINGA_MinVisible,   10,
  805.                         TAG_END),
  806.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST9] =
  807.                         NewObject
  808.                         (   STRING_GetClass(),    NULL,
  809.                             GA_ID,                GID_1_ST9,
  810.                             GA_TabCycle,          TRUE,
  811.                             GA_RelVerify,         TRUE,
  812.                             STRINGA_TextVal,      report.thirdname,
  813.                             STRINGA_MaxChars,     MEDFIELD,
  814.                             STRINGA_MinVisible,   10,
  815.                         TAG_END),
  816.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST10] =
  817.                         NewObject
  818.                         (   STRING_GetClass(),    NULL,
  819.                             GA_ID,                GID_1_ST10,
  820.                             GA_TabCycle,          TRUE,
  821.                             GA_RelVerify,         TRUE,
  822.                             STRINGA_TextVal,      report.thirdver,
  823.                             STRINGA_MaxChars,     MEDFIELD,
  824.                             STRINGA_MinVisible,   10,
  825.                         TAG_END),
  826.                     TAG_END),
  827.                 TAG_END),
  828.                 LAYOUT_AddChild,
  829.                 NewObject
  830.                 (   LAYOUT_GetClass(),    NULL,
  831.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  832.                     LAYOUT_SpaceOuter,    TRUE,
  833.                     LAYOUT_DeferLayout,   TRUE,
  834.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  835.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  836.                     LAYOUT_BevelStyle,    BVS_NONE,
  837.                     LAYOUT_AddImage,
  838.                     NewObject
  839.                     (   LABEL_GetClass(),     NULL,
  840.                         LABEL_Text,           "Configuration:",
  841.                         LABEL_Justification,  LJ_RIGHT,
  842.                     TAG_END),
  843.                 TAG_END),
  844.                 CHILD_WeightedHeight,      0,
  845.                 LAYOUT_AddChild,
  846.                 NewObject
  847.                 (   LAYOUT_GetClass(),    NULL,
  848.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  849.                     LAYOUT_SpaceOuter,    TRUE,
  850.                     LAYOUT_DeferLayout,   TRUE,
  851.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  852.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  853.                     LAYOUT_BevelStyle,    BVS_FIELD,
  854.                     LAYOUT_AddChild,
  855.                     NewObject
  856.                     (   LAYOUT_GetClass(),    NULL,
  857.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  858.                         LAYOUT_SpaceOuter,    TRUE,
  859.                         LAYOUT_DeferLayout,   TRUE,
  860.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  861.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  862.                         LAYOUT_BevelStyle,    BVS_NONE,
  863.                         LAYOUT_AddChild,
  864.                         NewObject
  865.                         (   LAYOUT_GetClass(),    NULL,
  866.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  867.                             LAYOUT_SpaceOuter,    TRUE,
  868.                             LAYOUT_DeferLayout,   TRUE,
  869.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  870.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  871.                             LAYOUT_BevelStyle,    BVS_NONE,
  872.                             LAYOUT_AddChild,
  873.                             NewObject
  874.                             (   LAYOUT_GetClass(),    NULL,
  875.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  876.                                 LAYOUT_SpaceOuter,    TRUE,
  877.                                 LAYOUT_DeferLayout,   TRUE,
  878.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  879.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  880.                                 LAYOUT_BevelStyle,    BVS_NONE,
  881.                                 LAYOUT_AddImage,
  882.                                 NewObject
  883.                                 (   LABEL_GetClass(),     NULL,
  884.                                     LABEL_Text,           "_Model:",
  885.                                     LABEL_Justification,  LJ_RIGHT,
  886.                                 TAG_END),
  887.                             TAG_END),
  888.                             CHILD_WeightedWidth,      50,
  889.                             LAYOUT_AddChild,          report_gadgets[GID_1_CH3] =
  890.                             NewObject
  891.                             (   CHOOSER_GetClass(),   NULL,
  892.                                 GA_ID,                GID_1_CH3,
  893.                                 GA_RelVerify,         TRUE,
  894.                                 CHOOSER_PopUp,        TRUE,
  895.                                 CHOOSER_LabelArray,   ModelOptions,
  896.                                 CHOOSER_Selected,     (WORD) report.model,
  897.                                 CHOOSER_MaxLabels,    MODELS + 1,
  898.                             TAG_END),
  899.                             CHILD_WeightedWidth,      50,
  900.                         TAG_END),
  901.                         LAYOUT_AddChild,
  902.                         NewObject
  903.                         (   LAYOUT_GetClass(),    NULL,
  904.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  905.                             LAYOUT_SpaceOuter,    TRUE,
  906.                             LAYOUT_DeferLayout,   TRUE,
  907.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  908.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  909.                             LAYOUT_BevelStyle,    BVS_NONE,
  910.                             LAYOUT_AddChild,
  911.                             NewObject
  912.                             (   LAYOUT_GetClass(),    NULL,
  913.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  914.                                 LAYOUT_SpaceOuter,    TRUE,
  915.                                 LAYOUT_DeferLayout,   TRUE,
  916.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  917.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  918.                                 LAYOUT_BevelStyle,    BVS_NONE,
  919.                                 LAYOUT_AddImage,
  920.                                 NewObject
  921.                                 (   LABEL_GetClass(),     NULL,
  922.                                     LABEL_Text,           "CP_U:",
  923.                                     LABEL_Justification,  LJ_RIGHT,
  924.                                 TAG_END),
  925.                             TAG_END),
  926.                             CHILD_WeightedWidth,      50,
  927.                             LAYOUT_AddChild,          report_gadgets[GID_1_CH4] =
  928.                             NewObject
  929.                             (   CHOOSER_GetClass(),   NULL,
  930.                                 GA_ID,                GID_1_CH4,
  931.                                 GA_RelVerify,         TRUE,
  932.                                 CHOOSER_PopUp,        TRUE,
  933.                                 CHOOSER_LabelArray,   CPUOptions,
  934.                                 CHOOSER_Selected,     (WORD) report.cpu,
  935.                             TAG_END),
  936.                             CHILD_WeightedWidth,      50,
  937.                         TAG_END),
  938.                         LAYOUT_AddChild,
  939.                         NewObject
  940.                         (   LAYOUT_GetClass(),    NULL,
  941.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  942.                             LAYOUT_SpaceOuter,    TRUE,
  943.                             LAYOUT_DeferLayout,   TRUE,
  944.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  945.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  946.                             LAYOUT_BevelStyle,    BVS_NONE,
  947.                             LAYOUT_AddChild,
  948.                             NewObject
  949.                             (   LAYOUT_GetClass(),    NULL,
  950.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  951.                                 LAYOUT_SpaceOuter,    TRUE,
  952.                                 LAYOUT_DeferLayout,   TRUE,
  953.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  954.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  955.                                 LAYOUT_BevelStyle,    BVS_NONE,
  956.                                 LAYOUT_AddImage,
  957.                                 NewObject
  958.                                 (   LABEL_GetClass(),     NULL,
  959.                                     LABEL_Text,           "Ch_ipset Type:",
  960.                                     LABEL_Justification,  LJ_RIGHT,
  961.                                 TAG_END),
  962.                             TAG_END),
  963.                             CHILD_WeightedWidth,      50,
  964.                             LAYOUT_AddChild,          report_gadgets[GID_1_CH5] =
  965.                             NewObject
  966.                             (   CHOOSER_GetClass(),   NULL,
  967.                                 GA_ID,                GID_1_CH5,
  968.                                 GA_RelVerify,         TRUE,
  969.                                 CHOOSER_PopUp,        TRUE,
  970.                                 CHOOSER_LabelArray,   AgnusOptions,
  971.                                 CHOOSER_Selected,     (WORD) report.agnus,
  972.                             TAG_END),
  973.                             CHILD_WeightedWidth,      50,
  974.                         TAG_END),
  975.                         LAYOUT_AddChild,
  976.                         NewObject
  977.                         (   LAYOUT_GetClass(),    NULL,
  978.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  979.                             LAYOUT_SpaceOuter,    TRUE,
  980.                             LAYOUT_DeferLayout,   TRUE,
  981.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  982.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  983.                             LAYOUT_BevelStyle,    BVS_NONE,
  984.                             LAYOUT_AddChild,
  985.                             NewObject
  986.                             (   LAYOUT_GetClass(),    NULL,
  987.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  988.                                 LAYOUT_SpaceOuter,    TRUE,
  989.                                 LAYOUT_DeferLayout,   TRUE,
  990.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  991.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  992.                                 LAYOUT_BevelStyle,    BVS_NONE,
  993.                                 LAYOUT_AddImage,
  994.                                 NewObject
  995.                                 (   LABEL_GetClass(),     NULL,
  996.                                     LABEL_Text,           "_No. of floppies:",
  997.                                     LABEL_Justification,  LJ_RIGHT,
  998.                                 TAG_END),
  999.                             TAG_END),
  1000.                             CHILD_WeightedWidth,      50,
  1001.                             LAYOUT_AddChild,          report_gadgets[GID_1_IN1] =
  1002.                             NewObject
  1003.                             (   INTEGER_GetClass(),   NULL,
  1004.                                 GA_ID,                GID_1_IN1,
  1005.                                 GA_RelVerify,         TRUE,
  1006.                                 GA_TabCycle,          TRUE,
  1007.                                 INTEGER_Number,       report.floppies,
  1008.                                 INTEGER_Minimum,      0,
  1009.                                 INTEGER_Maximum,      4,
  1010.                                 INTEGER_MinVisible,   1,
  1011.                             TAG_END),
  1012.                             CHILD_WeightedWidth,      50,
  1013.                         TAG_END),
  1014.                         LAYOUT_AddChild,
  1015.                         NewObject
  1016.                         (   LAYOUT_GetClass(),    NULL,
  1017.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1018.                             LAYOUT_SpaceOuter,    TRUE,
  1019.                             LAYOUT_DeferLayout,   TRUE,
  1020.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  1021.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  1022.                             LAYOUT_BevelStyle,    BVS_NONE,
  1023.                             LAYOUT_AddChild,
  1024.                             NewObject
  1025.                             (   LAYOUT_GetClass(),    NULL,
  1026.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1027.                                 LAYOUT_SpaceOuter,    TRUE,
  1028.                                 LAYOUT_DeferLayout,   TRUE,
  1029.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1030.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  1031.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1032.                                 LAYOUT_AddImage,
  1033.                                 NewObject
  1034.                                 (   LABEL_GetClass(),     NULL,
  1035.                                     LABEL_Text,           "_Chip RAM:",
  1036.                                     LABEL_Justification,  LJ_RIGHT,
  1037.                                 TAG_END),
  1038.                             TAG_END),
  1039.                             CHILD_WeightedWidth,      50,
  1040.                             LAYOUT_AddChild,
  1041.                             NewObject
  1042.                             (   LAYOUT_GetClass(),    NULL,
  1043.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1044.                                 LAYOUT_SpaceOuter,    TRUE,
  1045.                                 LAYOUT_DeferLayout,   TRUE,
  1046.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1047.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1048.                                 LAYOUT_AddChild,          report_gadgets[GID_1_ST11] =
  1049.                                 NewObject
  1050.                                 (   STRING_GetClass(),    NULL,
  1051.                                     GA_ID,                GID_1_ST11,
  1052.                                     GA_RelVerify,         TRUE,
  1053.                                     GA_TabCycle,          TRUE,
  1054.                                     STRINGA_TextVal,      report.chipram,
  1055.                                     STRINGA_MaxChars,     4,
  1056.                                 TAG_END),
  1057.                                 LAYOUT_AddImage,
  1058.                                 NewObject
  1059.                                 (   LABEL_GetClass(),     NULL,
  1060.                                     LABEL_Text,           "Mb",
  1061.                                     LABEL_Justification,  LJ_RIGHT,
  1062.                                 TAG_END),
  1063.                                 CHILD_WeightedWidth,      0,
  1064.                             TAG_END),
  1065.                             CHILD_WeightedWidth,          50,
  1066.                         TAG_END),
  1067.                         LAYOUT_AddChild,
  1068.                         NewObject
  1069.                         (   LAYOUT_GetClass(),    NULL,
  1070.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1071.                             LAYOUT_SpaceOuter,    TRUE,
  1072.                             LAYOUT_DeferLayout,   TRUE,
  1073.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  1074.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  1075.                             LAYOUT_BevelStyle,    BVS_NONE,
  1076.                             LAYOUT_AddChild,
  1077.                             NewObject
  1078.                             (   LAYOUT_GetClass(),    NULL,
  1079.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1080.                                 LAYOUT_SpaceOuter,    TRUE,
  1081.                                 LAYOUT_DeferLayout,   TRUE,
  1082.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1083.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  1084.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1085.                                 LAYOUT_AddImage,
  1086.                                 NewObject
  1087.                                 (   LABEL_GetClass(),     NULL,
  1088.                                     LABEL_Text,           "Slow_/fast RAM:",
  1089.                                     LABEL_Justification,  LJ_RIGHT,
  1090.                                 TAG_END),
  1091.                             TAG_END),
  1092.                             CHILD_WeightedWidth,      50,
  1093.                             LAYOUT_AddChild,
  1094.                             NewObject
  1095.                             (   LAYOUT_GetClass(),    NULL,
  1096.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1097.                                 LAYOUT_SpaceOuter,    TRUE,
  1098.                                 LAYOUT_DeferLayout,   TRUE,
  1099.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1100.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1101.                                 LAYOUT_AddChild,          report_gadgets[GID_1_ST12] =
  1102.                                 NewObject
  1103.                                 (   STRING_GetClass(),    NULL,
  1104.                                     GA_ID,                GID_1_ST12,
  1105.                                     GA_RelVerify,         TRUE,
  1106.                                     GA_TabCycle,          TRUE,
  1107.                                     STRINGA_TextVal,      report.fastram,
  1108.                                     STRINGA_MaxChars,     4,
  1109.                                 TAG_END),
  1110.                                 LAYOUT_AddImage,
  1111.                                 NewObject
  1112.                                 (   LABEL_GetClass(),     NULL,
  1113.                                     LABEL_Text,           "Mb",
  1114.                                     LABEL_Justification,  LJ_RIGHT,
  1115.                                 TAG_END),
  1116.                                 CHILD_WeightedWidth,      0,
  1117.                             TAG_END),
  1118.                             CHILD_WeightedWidth,          50,
  1119.                         TAG_END),
  1120.                         LAYOUT_AddChild,
  1121.                         NewObject
  1122.                         (   LAYOUT_GetClass(),    NULL,
  1123.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1124.                             LAYOUT_SpaceOuter,    TRUE,
  1125.                             LAYOUT_DeferLayout,   TRUE,
  1126.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  1127.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  1128.                             LAYOUT_BevelStyle,    BVS_NONE,
  1129.                             LAYOUT_AddChild,
  1130.                             NewObject
  1131.                             (   LAYOUT_GetClass(),    NULL,
  1132.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1133.                                 LAYOUT_SpaceOuter,    TRUE,
  1134.                                 LAYOUT_DeferLayout,   TRUE,
  1135.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1136.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  1137.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1138.                                 LAYOUT_AddImage,
  1139.                                 NewObject
  1140.                                 (   LABEL_GetClass(),     NULL,
  1141.                                     LABEL_Text,           "_HD controller:",
  1142.                                     LABEL_Justification,  LJ_RIGHT,
  1143.                                 TAG_END),
  1144.                             TAG_END),
  1145.                             CHILD_WeightedWidth,      50,
  1146.                             LAYOUT_AddChild,          report_gadgets[GID_1_ST13] =
  1147.                             NewObject
  1148.                             (   STRING_GetClass(),    NULL,
  1149.                                 GA_ID,                GID_1_ST13,
  1150.                                 GA_RelVerify,         TRUE,
  1151.                                 GA_TabCycle,          TRUE,
  1152.                                 STRINGA_TextVal,      report.hard,
  1153.                                 STRINGA_MaxChars,     MEDFIELD,
  1154.                             TAG_END),
  1155.                             CHILD_WeightedWidth,      50,
  1156.                         TAG_END),
  1157.                         LAYOUT_AddChild,
  1158.                         NewObject
  1159.                         (   LAYOUT_GetClass(),    NULL,
  1160.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1161.                             LAYOUT_SpaceOuter,    TRUE,
  1162.                             LAYOUT_DeferLayout,   TRUE,
  1163.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  1164.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  1165.                             LAYOUT_BevelStyle,    BVS_NONE,
  1166.                             LAYOUT_AddChild,
  1167.                             NewObject
  1168.                             (   LAYOUT_GetClass(),    NULL,
  1169.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1170.                                 LAYOUT_SpaceOuter,    TRUE,
  1171.                                 LAYOUT_DeferLayout,   TRUE,
  1172.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1173.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  1174.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1175.                                 LAYOUT_AddImage,
  1176.                                 NewObject
  1177.                                 (   LABEL_GetClass(),     NULL,
  1178.                                     LABEL_Text,           "E_xpansion cards:",
  1179.                                     LABEL_Justification,  LJ_RIGHT,
  1180.                                 TAG_END),
  1181.                             TAG_END),
  1182.                             CHILD_WeightedWidth,      50,
  1183.                             LAYOUT_AddChild,          report_gadgets[GID_1_ST14] =
  1184.                             NewObject
  1185.                             (   STRING_GetClass(),    NULL,
  1186.                                 GA_ID,                GID_1_ST14,
  1187.                                 GA_RelVerify,         TRUE,
  1188.                                 GA_TabCycle,          TRUE,
  1189.                                 STRINGA_TextVal,      report.expansion,
  1190.                                 STRINGA_MaxChars,     LONGFIELD,
  1191.                             TAG_END),
  1192.                             CHILD_WeightedWidth,      50,
  1193.                         TAG_END),
  1194.                     TAG_END),
  1195.                 TAG_END),
  1196.             TAG_END),
  1197.             CHILD_WeightedWidth,      70,
  1198.         TAG_END),
  1199.         LAYOUT_AddChild,
  1200.         NewObject
  1201.         (   LAYOUT_GetClass(),        NULL,
  1202.             LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1203.             LAYOUT_SpaceOuter,        TRUE,
  1204.             LAYOUT_DeferLayout,       TRUE,
  1205.             LAYOUT_BevelStyle,        BVS_NONE,
  1206.             LAYOUT_AddChild,          report_gadgets[GID_1_BU2] =
  1207.             NewObject
  1208.             (   NULL,              "button.gadget",
  1209.                 GA_ID,             GID_1_BU2,
  1210.                 GA_RelVerify,      TRUE,
  1211.                 GA_Text,           "Sende_r...",
  1212.             TAG_END),
  1213.             LAYOUT_AddChild,       report_gadgets[GID_1_BU3] =
  1214.             NewObject
  1215.             (   NULL,              "button.gadget",
  1216.                 GA_ID,             GID_1_BU3,
  1217.                 GA_RelVerify,      TRUE,
  1218.                 GA_Text,           "Other pa_ge...",
  1219.             TAG_END),
  1220.         TAG_END),
  1221.         CHILD_WeightedHeight,      0,
  1222.     TAG_END),
  1223. TAG_END)))
  1224. {   rq("Can't create ReAction gadgets!");
  1225. }
  1226. unlockscreen();
  1227. openwindow();
  1228.  
  1229.     OnMenu(MainWindowPtr, FULLMENUNUM(MN_PROJECT, IN_NEW,    NOSUB));
  1230.     OnMenu(MainWindowPtr, FULLMENUNUM(MN_PROJECT, IN_OPEN,   NOSUB));
  1231.     OnMenu(MainWindowPtr, FULLMENUNUM(MN_PROJECT, IN_SAVE,   NOSUB));
  1232.     OnMenu(MainWindowPtr, FULLMENUNUM(MN_PROJECT, IN_SAVEAS, NOSUB));
  1233.  
  1234.     updatereportgadgets();
  1235.     ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST1]);
  1236.  
  1237.     loop();
  1238.     readreportgadgets();
  1239.     closewindow();
  1240. }
  1241.  
  1242. MODULE void readreportgadgets(void)
  1243. {   STRPTR stringptr;
  1244.  
  1245.     if (!(GetAttr
  1246.     (   STRINGA_TextVal, report_gadgets[GID_1_ST1], (ULONG *) &stringptr
  1247.     )))
  1248.     {   rq("Unsupported inquiry!"); // should never happen
  1249.     }
  1250.     strcpy(report.summary, stringptr);
  1251.  
  1252.     if (report.type == COM)
  1253.     {   if (!(GetAttr
  1254.         (   STRINGA_TextVal, report_gadgets[GID_1_ST8], (ULONG *) &stringptr
  1255.         )))
  1256.         {   rq("Unsupported inquiry!"); // should never happen
  1257.         }
  1258.         strcpy(report.thirdmanuf, stringptr);
  1259.         if (!(GetAttr
  1260.         (   STRINGA_TextVal, report_gadgets[GID_1_ST9], (ULONG *) &stringptr
  1261.         )))
  1262.         {   rq("Unsupported inquiry!"); // should never happen
  1263.         }
  1264.         strcpy(report.thirdname, stringptr);
  1265.         if (!(GetAttr
  1266.         (   STRINGA_TextVal, report_gadgets[GID_1_ST10], (ULONG *) &stringptr
  1267.         )))
  1268.         {   rq("Unsupported inquiry!"); // should never happen
  1269.         }
  1270.         strcpy(report.thirdver, stringptr);
  1271.     } elif (report.type == BUG)
  1272.     {   if (!(GetAttr
  1273.         (   STRINGA_TextVal, report_gadgets[GID_1_ST7], (ULONG *) &stringptr
  1274.         )))
  1275.         {   rq("Unsupported inquiry!"); // should never happen
  1276.         }
  1277.         strcpy(report.pp, stringptr);
  1278.         if (!(GetAttr
  1279.         (   STRINGA_TextVal, report_gadgets[GID_1_ST6], (ULONG *) &stringptr
  1280.         )))
  1281.         {   rq("Unsupported inquiry!"); // should never happen
  1282.         }
  1283.         strcpy(report.pv, stringptr);
  1284.     }
  1285.     if (report.type != ENH)
  1286.     {   if (!(GetAttr
  1287.         (   STRINGA_TextVal, report_gadgets[GID_1_ST4], (ULONG *) &stringptr
  1288.         )))
  1289.         {   rq("Unsupported inquiry!"); // should never happen
  1290.         }
  1291.         strcpy(report.ks, stringptr);
  1292.         if (!(GetAttr
  1293.         (   STRINGA_TextVal, report_gadgets[GID_1_ST5], (ULONG *) &stringptr
  1294.         )))
  1295.         {   rq("Unsupported inquiry!"); // should never happen
  1296.         }
  1297.         strcpy(report.wb, stringptr);
  1298.         if (!(GetAttr
  1299.         (   STRINGA_TextVal, report_gadgets[GID_1_ST3], (ULONG *) &stringptr
  1300.         )))
  1301.         {   rq("Unsupported inquiry!"); // should never happen
  1302.         }
  1303.         strcpy(report.debug, stringptr);
  1304.     }
  1305.  
  1306.     if (!(GetAttr
  1307.     (   STRINGA_TextVal, report_gadgets[GID_1_ST11], (ULONG *) &stringptr
  1308.     )))
  1309.     {   rq("Unsupported inquiry!"); // should never happen
  1310.     }
  1311.     strcpy(report.chipram, stringptr);
  1312.     if (!(GetAttr
  1313.     (   STRINGA_TextVal, report_gadgets[GID_1_ST12], (ULONG *) &stringptr
  1314.     )))
  1315.     {   rq("Unsupported inquiry!"); // should never happen
  1316.     }
  1317.     strcpy(report.fastram, stringptr);
  1318.     if (!(GetAttr
  1319.     (   STRINGA_TextVal, report_gadgets[GID_1_ST13], (ULONG *) &stringptr
  1320.     )))
  1321.     {   rq("Unsupported inquiry!"); // should never happen
  1322.     }
  1323.     strcpy(report.hard, stringptr);
  1324.     if (!(GetAttr
  1325.     (   STRINGA_TextVal, report_gadgets[GID_1_ST14], (ULONG *) &stringptr
  1326.     )))
  1327.     {   rq("Unsupported inquiry!"); // should never happen
  1328.     }
  1329.     strcpy(report.expansion, stringptr);
  1330.     if (!(GetAttr
  1331.     (   INTEGER_Number, report_gadgets[GID_1_IN1], (ULONG *) &report.floppies
  1332.     )))
  1333.     {   rq("Unsupported inquiry!"); // should never happen
  1334. }   }
  1335.  
  1336. AGLOBAL void savereport(ABOOL saveas)
  1337. { /*    # Subject: <subject><LF>
  1338.         # Type: bug|compat|enhancement<LF>
  1339. 1,3     # Subsystem: <subsystem><LF>
  1340. 2       # ProductName: <name> (vers=<version>)
  1341. 2       # ProductInfo: :<manufacturer>:
  1342.         # Severity: a|b|c|ok|e
  1343. 1       # Release: KS=<version>,WB=<version>,Program=<version>
  1344. 2       # Release: KS=<version>,WB=<version>
  1345.         # Date: <weekday> dd-Mon-yy hh:mm:ss
  1346.         # Refer: <refer>
  1347.         # Path: <path>
  1348.         # ReferID: <referid>
  1349.         # Config: <config>
  1350. 1,2a-c    ### BRIEF BUG DESCRIPTION:
  1351. 1,2a-c    ### BUG GENERATION PROCEDURE OR EXAMPLE:
  1352. 1,2     ### ALSO RUNNING:
  1353.         <debug>
  1354. 1,2     ### IF THIS WORKS DIFFERENTLY ON OTHER VERSIONS OR HARDWARE,
  1355.         EXPLAIN:
  1356. 2a-c    ### WHAT DEVELOPER IS DOING IN THAT AREA OF SW OR HW:    
  1357. 1,2a-c    ### RELATED PROBLEMS:
  1358. 3       ### ENHANCEMENT REQUEST: */
  1359.  
  1360.     readreportgadgets();
  1361.  
  1362.     strcpy(IOBuffer, "# Subject: ");
  1363.     strcat(IOBuffer, report.summary);
  1364.     strcat(IOBuffer, "\n# Type: ");
  1365.     if (report.type == BUG)
  1366.     strcat(IOBuffer, "bug");
  1367.     elif (report.type == COM)
  1368.         strcat(IOBuffer, "compat");
  1369.     else /* assumes (report.type == ENH) */
  1370.         strcat(IOBuffer, "enhancement");
  1371.     strcat(IOBuffer, "\n");
  1372.     if (report.type == BUG || report.type == ENH)
  1373.     {    strcat(IOBuffer, "# Subsystem: ");
  1374.         strcat(IOBuffer, subsystems[report.subsystem].unfriendly);
  1375.     strcat(IOBuffer, "\n");
  1376.     } else
  1377.     {    strcat(IOBuffer, "# ProductName: ");
  1378.     strcat(IOBuffer, report.thirdname);
  1379.         strcat(IOBuffer, " (vers=");
  1380.         strcat(IOBuffer, report.thirdver);
  1381.         strcat(IOBuffer, ")\n# ProductInfo: :");
  1382.         strcat(IOBuffer, report.thirdmanuf);
  1383.         strcat(IOBuffer, ":\n");
  1384.     }
  1385.     strcat(IOBuffer, "# Severity: ");
  1386.     if (report.type == ENH)
  1387.         strcat(IOBuffer, "e");
  1388.     elif (report.severity == 0)
  1389.         strcat(IOBuffer, "a");
  1390.     elif (report.severity == 1)
  1391.         strcat(IOBuffer, "b");
  1392.     elif (report.severity == 2)
  1393.         strcat(IOBuffer, "c");
  1394.     else /* assumes report.severity == 3 */
  1395.     strcat(IOBuffer, "ok");
  1396.     strcat(IOBuffer, "\n");
  1397.     if (report.type == BUG || report.type == COM)
  1398.     {    strcat(IOBuffer, "# Release: KS=");
  1399.         strcat(IOBuffer, report.ks);
  1400.         strcat(IOBuffer, ",WB=");
  1401.         strcat(IOBuffer, report.wb);
  1402.         if (report.type == BUG)
  1403.         {    strcat(IOBuffer, ",Program=");
  1404.             strcat(IOBuffer, report.pv);
  1405.         }
  1406.         strcat(IOBuffer, "\n");
  1407.     }
  1408.     
  1409.     getdate();
  1410.     strcat(IOBuffer, "# Date: ");
  1411.     strcat(IOBuffer, weekdaystring);
  1412.     strcat(IOBuffer, " ");
  1413.     strcat(IOBuffer, datestring);
  1414.     strcat(IOBuffer, " ");
  1415.     strcat(IOBuffer, timestring);
  1416.     strcat(IOBuffer, "\n");
  1417.     strcat(IOBuffer, report.refer);
  1418.     strcat(IOBuffer, report.path);
  1419.     strcat(IOBuffer, report.referid);
  1420.     strcat(IOBuffer, report.config);
  1421.     strcat(IOBuffer, "\n");
  1422.  
  1423.     if (report.type == BUG || (report.type == COM && report.severity != 3))
  1424.     {   strcat
  1425.         (   IOBuffer,
  1426.             "### BRIEF BUG DESCRIPTION:\n"
  1427.         );
  1428.         strcat(IOBuffer, report.textfield[0]);
  1429.         strcat
  1430.         (   IOBuffer,
  1431.             "\n\n### BUG GENERATION PROCEDURE OR EXAMPLE:\n"
  1432.     );
  1433.         strcat(IOBuffer, report.textfield[1]);
  1434.         strcat(IOBuffer, "\n\n");
  1435.     }
  1436.     if (report.type == BUG || report.type == COM)
  1437.     {   strcat(IOBuffer, "### ALSO RUNNING:\n");
  1438.         strcat(IOBuffer, report.debug);
  1439.         strcat
  1440.         (   IOBuffer,
  1441.             "\n\n### IF THIS WORKS DIFFERENTLY ON "
  1442.             "OTHER VERSIONS OR HARDWARE, EXPLAIN:\n"
  1443.         );
  1444.         strcat(IOBuffer, report.textfield[2]);
  1445.         strcat(IOBuffer, "\n\n");
  1446.     }
  1447.     if (report.type == COM && report.severity != 3)
  1448.     {   strcat
  1449.         (   IOBuffer,
  1450.             "### WHAT DEVELOPER IS DOING IN THAT AREA OF HW OR SW:\n"
  1451.         );
  1452.         strcat(IOBuffer, report.textfield[3]);
  1453.         strcat(IOBuffer, "\n\n");
  1454.     }
  1455.     if (report.type == BUG || (report.type == COM && report.severity != 3))
  1456.     {   strcat(IOBuffer, "### RELATED PROBLEMS:\n");
  1457.         strcat(IOBuffer, report.textfield[4]);
  1458.         strcat(IOBuffer, "\n\n");
  1459.     } elif (report.type == ENH)
  1460.     {   strcat(IOBuffer, "### ENHANCEMENT REQUEST:\n");
  1461.         strcat(IOBuffer, report.textfield[5]);
  1462.         strcat(IOBuffer, "\n\n");
  1463.     }
  1464.  
  1465.     if (!report.output[0] || saveas) // if we need a filename
  1466.     {   if (saveasl("Save Bug Report", "~(#?.info)"))
  1467.         {   strcpy(report.output, aslresult);
  1468.             writeout(report.output);
  1469.     }   }
  1470.     else
  1471.     {   writeout(report.output);
  1472. }   }
  1473.     
  1474. AGLOBAL void report_ra_loop(ULONG gid)
  1475. {   switch(gid)
  1476.     {
  1477.     case GID_1_BU1:
  1478.         page = 11;
  1479.     break;
  1480.     case GID_1_BU2:
  1481.         page = 1;
  1482.     break;
  1483.     case GID_1_BU3:
  1484.         page = 12;
  1485.     break;
  1486.     case GID_1_CH1:
  1487.         if (!(GetAttr
  1488.         (   CHOOSER_Selected, report_gadgets[GID_1_CH1], (ULONG *) &report.type
  1489.         )))
  1490.         {   rq("Unsupported inquiry!"); // should never happen
  1491.         }
  1492.         updatereportgadgets();
  1493.     break;
  1494.     case GID_1_CH2:
  1495.         if (!(GetAttr
  1496.         (   CHOOSER_Selected, report_gadgets[GID_1_CH2], (ULONG *) &report.severity
  1497.         )))
  1498.         {   rq("Unsupported inquiry!"); // should never happen
  1499.         }
  1500.         if (report.type == BUG && report.severity == 3)
  1501.         {   report.severity = 0;
  1502.       
  1503.             SetGadgetAttrs
  1504.             (   report_gadgets[GID_1_CH2], MainWindowPtr, NULL,
  1505.                 CHOOSER_Selected,          report.severity
  1506.             );
  1507.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH2], MainWindowPtr, NULL);
  1508.         }
  1509.     break;
  1510.     case GID_1_CH3:
  1511.         if (!(GetAttr
  1512.         (   CHOOSER_Selected, report_gadgets[GID_1_CH3], (ULONG *) &report.model
  1513.         )))
  1514.         {   rq("Unsupported inquiry!"); // should never happen
  1515.         }
  1516.     break;
  1517.     case GID_1_CH4:
  1518.         if (!(GetAttr
  1519.         (   CHOOSER_Selected, report_gadgets[GID_1_CH4], (ULONG *) &report.cpu
  1520.         )))
  1521.         {   rq("Unsupported inquiry!"); // should never happen
  1522.         }
  1523.     break;
  1524.     case GID_1_CH5:
  1525.         if (!(GetAttr
  1526.         (   CHOOSER_Selected, report_gadgets[GID_1_CH5], (ULONG *) &report.agnus
  1527.         )))
  1528.         {   rq("Unsupported inquiry!"); // should never happen
  1529.         }
  1530.     break;
  1531.     case GID_1_ST7:
  1532.         if (report.type == BUG)
  1533.         {   refreshpv(); // refreshpv() also reads the gadget for us.
  1534.         }
  1535.     break;
  1536.     case GID_1_BU4:
  1537.         if (report.type == BUG)
  1538.         {   if (asl("~(#?.info)"))
  1539.             {   strcpy(report.pp, aslresult);
  1540.                 SetGadgetAttrs
  1541.                 (   report_gadgets[GID_1_ST7], MainWindowPtr, NULL,
  1542.                     STRINGA_TextVal,           report.pp
  1543.                 );
  1544.                 refreshpv();
  1545.         }   }
  1546.     break;
  1547.     case GID_1_LB1:
  1548.         if (report.type != COM)
  1549.         {   if (!(GetAttr
  1550.             (   LISTBROWSER_Selected, report_gadgets[GID_1_LB1], &report.subsystem
  1551.             )))
  1552.             {   rq("Unsupported inquiry!"); // should never happen
  1553.             }
  1554.             updateemail();
  1555.         }
  1556.     break;
  1557.     default:
  1558.     break;
  1559. }   }
  1560.  
  1561. MODULE void refreshpv(void)
  1562. {   ULONG  i;
  1563.     BPTR   FileHandle;
  1564.     STRPTR stringptr;
  1565.  
  1566.     strcpy(string, "Version ");
  1567.     if (!(GetAttr
  1568.     (   STRINGA_TextVal, report_gadgets[GID_1_ST7], (ULONG *) &stringptr
  1569.     )))
  1570.     {   rq("Unsupported inquiry!"); // should never happen
  1571.     }
  1572.     strcpy(report.pp, stringptr);
  1573.     strcat(string, report.pp);
  1574.  
  1575.     if (!(FileHandle = (BPTR) Open("T:ReportPlus.temp", MODE_NEWFILE)))
  1576.         rq("Can't open T:ReportPlus.temp for writing!");
  1577.     if (!Execute(string, NULL, FileHandle))
  1578.         rq("Can't execute Version!");
  1579.     if (!Close(FileHandle))
  1580.         rq("Can't close T:ReportPlus.temp for writing!");
  1581.  
  1582.     readordie("T:ReportPlus.temp");
  1583.  
  1584.     DeleteFile("T:ReportPlus.temp"); /* returns FALSE for failure */
  1585.     for (i = 0; i <= MEDFIELD; i++)
  1586.     {   if (IOBuffer[i] == LF)
  1587.         {   IOBuffer[i] = 0;
  1588.             break;
  1589.     }   }
  1590.     strcpy(report.pv, IOBuffer);
  1591.     SetGadgetAttrs
  1592.     (   report_gadgets[GID_1_ST6], MainWindowPtr, NULL,
  1593.         STRINGA_TextVal,           report.pv
  1594.     );
  1595. }
  1596.  
  1597. AGLOBAL void report_die(void)
  1598. {   if (SubsystemNodes)
  1599.     {   clearreactionlist(&SubsystemList);
  1600.         SubsystemNodes = FALSE;
  1601. }   }
  1602.  
  1603. AGLOBAL void report_init(void)
  1604. {   ULONG        i;
  1605.     struct Node* ListBrowserNodePtr;
  1606.  
  1607.     NewList(&SubsystemList);
  1608.     for (i = 0; i <= SUBSYSTEMS; i++)
  1609.     {   if (!(ListBrowserNodePtr = AllocListBrowserNode
  1610.         (   1,                  // columns
  1611.             /* LBNCA_ tags are those that apply to the specific column. */
  1612.             LBNA_Column,        0,
  1613.             LBNCA_Text,         subsystems[i].friendly,
  1614.             LBNCA_CopyText,     TRUE,
  1615.             TAG_END
  1616.         )))
  1617.         {   rq("Can't create ReAction listbrowser.gadget node(s)!");
  1618.         }
  1619.         AddTail(&SubsystemList, ListBrowserNodePtr);
  1620.         SubsystemNodes = TRUE;
  1621.     }
  1622.  
  1623.     newreport(FALSE);
  1624. }
  1625.     
  1626. MODULE void updatereportgadgets(void)
  1627. {   // the following command is only needed when New or Open... is the
  1628.     // cause of the update.
  1629.     SetGadgetAttrs
  1630.     (   report_gadgets[GID_1_ST1], MainWindowPtr, NULL,
  1631.         STRINGA_TextVal,           report.summary
  1632.     ); // summary
  1633.  
  1634.     if (report.type == BUG && report.severity == 3)
  1635.     {   report.severity = 0;
  1636.     }
  1637.  
  1638.     SetGadgetAttrs
  1639.     (   report_gadgets[GID_1_CH1], MainWindowPtr, NULL,
  1640.         CHOOSER_Selected,          report.type
  1641.     );
  1642.     RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH1], MainWindowPtr, NULL);
  1643.     SetGadgetAttrs
  1644.     (   report_gadgets[GID_1_LB1], MainWindowPtr, NULL,
  1645.         LISTBROWSER_Selected,      report.subsystem
  1646.     );
  1647.     updateemail();
  1648.  
  1649.     if (report.type == BUG)
  1650.     {   SetGadgetAttrs
  1651.         (   report_gadgets[GID_1_ST7], MainWindowPtr, NULL,
  1652.             STRINGA_TextVal,           report.pp,
  1653.             GA_Disabled,               FALSE
  1654.         );
  1655.         SetGadgetAttrs
  1656.         (   report_gadgets[GID_1_BU4], MainWindowPtr, NULL,
  1657.             GA_Disabled,               FALSE
  1658.         );
  1659.         SetGadgetAttrs
  1660.         (   report_gadgets[GID_1_ST6], MainWindowPtr, NULL,
  1661.             STRINGA_TextVal,           report.pv,
  1662.             GA_Disabled,               FALSE
  1663.         );
  1664.     } else
  1665.     {   SetGadgetAttrs
  1666.         (   report_gadgets[GID_1_ST7], MainWindowPtr, NULL,
  1667.             STRINGA_TextVal,           report.pp,
  1668.             GA_Disabled,               TRUE
  1669.         );
  1670.         SetGadgetAttrs
  1671.         (   report_gadgets[GID_1_BU4], MainWindowPtr, NULL,
  1672.             GA_Disabled,               TRUE
  1673.         );
  1674.         SetGadgetAttrs
  1675.         (   report_gadgets[GID_1_ST6], MainWindowPtr, NULL,
  1676.             STRINGA_TextVal,           report.pv,
  1677.             GA_Disabled,               TRUE
  1678.         );
  1679.     }
  1680.  
  1681.     if (report.type == COM)
  1682.     {   SetGadgetAttrs
  1683.         (   report_gadgets[GID_1_LB1], MainWindowPtr, NULL,
  1684.             GA_Disabled,               TRUE
  1685.         );
  1686.         SetGadgetAttrs
  1687.         (   report_gadgets[GID_1_ST8], MainWindowPtr, NULL,
  1688.             STRINGA_TextVal,           report.thirdmanuf,
  1689.             GA_Disabled,               FALSE
  1690.         );
  1691.         SetGadgetAttrs
  1692.         (   report_gadgets[GID_1_ST9], MainWindowPtr, NULL,
  1693.             STRINGA_TextVal,           report.thirdname,
  1694.             GA_Disabled,               FALSE
  1695.         );
  1696.         SetGadgetAttrs
  1697.         (   report_gadgets[GID_1_ST10],MainWindowPtr, NULL,
  1698.             STRINGA_TextVal,           report.thirdver,
  1699.             GA_Disabled,               FALSE
  1700.         );
  1701.     } else
  1702.     {   SetGadgetAttrs
  1703.         (   report_gadgets[GID_1_LB1], MainWindowPtr, NULL,
  1704.             GA_Disabled,               FALSE
  1705.         );
  1706.         SetGadgetAttrs
  1707.         (   report_gadgets[GID_1_ST8], MainWindowPtr, NULL,
  1708.             STRINGA_TextVal,           report.thirdmanuf,
  1709.             GA_Disabled,               TRUE
  1710.         );
  1711.         SetGadgetAttrs
  1712.         (   report_gadgets[GID_1_ST9], MainWindowPtr, NULL,
  1713.             STRINGA_TextVal,           report.thirdname,
  1714.             GA_Disabled,               TRUE
  1715.         );
  1716.         SetGadgetAttrs
  1717.         (   report_gadgets[GID_1_ST10],MainWindowPtr, NULL,
  1718.             STRINGA_TextVal,           report.thirdver,
  1719.             GA_Disabled,               TRUE
  1720.         );
  1721.     }
  1722.  
  1723.     if (report.type == ENH)
  1724.     {   SetGadgetAttrs
  1725.         (   report_gadgets[GID_1_ST3], MainWindowPtr, NULL,
  1726.             CHOOSER_Selected,          report.debug,
  1727.             GA_Disabled,               TRUE
  1728.         );
  1729.         SetGadgetAttrs
  1730.         (   report_gadgets[GID_1_CH2], MainWindowPtr, NULL,
  1731.             CHOOSER_Selected,          report.severity,
  1732.             GA_Disabled,               FALSE
  1733.         );
  1734.         RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH2], MainWindowPtr, NULL);
  1735.         SetGadgetAttrs
  1736.         (   report_gadgets[GID_1_ST4], MainWindowPtr, NULL,
  1737.             STRINGA_TextVal,           report.ks,
  1738.             GA_Disabled,               TRUE
  1739.         );
  1740.         SetGadgetAttrs
  1741.         (   report_gadgets[GID_1_ST5], MainWindowPtr, NULL,
  1742.             STRINGA_TextVal,           report.wb,
  1743.             GA_Disabled,               TRUE
  1744.         );
  1745.     } else
  1746.     {   SetGadgetAttrs
  1747.         (   report_gadgets[GID_1_ST3], MainWindowPtr, NULL,
  1748.             CHOOSER_Selected,          report.debug,
  1749.             GA_Disabled,               FALSE
  1750.         );
  1751.         SetGadgetAttrs
  1752.         (   report_gadgets[GID_1_CH2], MainWindowPtr, NULL,
  1753.             CHOOSER_Selected,          report.severity,
  1754.             GA_Disabled,               FALSE
  1755.         );
  1756.         RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH2], MainWindowPtr, NULL);
  1757.         SetGadgetAttrs
  1758.         (   report_gadgets[GID_1_ST4], MainWindowPtr, NULL,
  1759.             STRINGA_TextVal,           report.ks,
  1760.             GA_Disabled,               FALSE
  1761.         );
  1762.         SetGadgetAttrs
  1763.         (   report_gadgets[GID_1_ST5], MainWindowPtr, NULL,
  1764.             STRINGA_TextVal,           report.wb,
  1765.             GA_Disabled,               FALSE
  1766.         );
  1767. }   }
  1768.  
  1769. AGLOBAL void newreport(ABOOL display)
  1770. {   ULONG i, stringoffset, bufferoffset;
  1771.     TEXT  cpustring[VLONGFIELD + 1];
  1772.  
  1773.     report.cpu = 0;
  1774.     if (cpuline[0] == '?')
  1775.     {   report.cpu = 0;
  1776.     } else
  1777.     {   stringoffset = 0;
  1778.         bufferoffset = 8;
  1779.         /* If cpuline[] is full of garbage then this code will cause
  1780.            problems. */
  1781.         while (cpuline[bufferoffset] != ' ')
  1782.         {   cpustring[stringoffset] = cpuline[bufferoffset];
  1783.             stringoffset++;
  1784.             bufferoffset++;
  1785.         }
  1786.         stringoffset++;
  1787.         cpustring[stringoffset] = 0;
  1788.  
  1789.         for (i = 0; i <= CPUS; i++)
  1790.         {   if (!stricmp(CPUOptions[i], cpustring))
  1791.             {   report.cpu = i;
  1792.                 break;
  1793.     }   }   }
  1794.  
  1795.     report.floppies      = 1;
  1796.     report.agnus         = 0;
  1797.     report.model         = 4;
  1798.     report.type          = 0;
  1799.     report.severity      = 0;
  1800.     report.subsystem     = 0;
  1801.  
  1802.     report.chipram[0]    =
  1803.     report.fastram[0]    =
  1804.     report.hard[0]       =
  1805.     report.debug[0]      =
  1806.     report.developer[0]  =
  1807.     report.expansion[0]  =
  1808.     report.summary[0]    =
  1809.     report.pv[0]         =
  1810.     report.pp[0]         =
  1811.     report.thirdname[0]  =
  1812.     report.thirdver[0]   =
  1813.     report.thirdmanuf[0] =
  1814.     report.lastname[0]   =
  1815.     report.firstname[0]  =
  1816.     report.company[0]    =
  1817.     report.phone[0]      =
  1818.     report.email[0]      =
  1819.     report.refer[0]      =
  1820.     report.referid[0]    =
  1821.     report.path[0]       =
  1822.     report.config[0]     =
  1823.     report.output[0]     = 0;
  1824.     if (GetVar("Kickstart", report.ks, 6, NULL) == -1)
  1825.         report.ks[0] = 0;
  1826.     if (GetVar("Workbench", report.wb, 6, NULL) == -1)
  1827.         report.wb[0] = 0;
  1828.     for (i = 0; i <= 5; i++)
  1829.     {   report.textfield[i][0] = 0;
  1830.     }
  1831.  
  1832.     /* Quicker than strcpy(report.foo, ""); is report.foo[0] = 0;
  1833.  
  1834.     Consider linking bug report generator with ID database to
  1835.     automatically generate the list of expansion cards. */
  1836.  
  1837.     if (display)
  1838.     {   updatereportgadgets();
  1839. }   }
  1840.  
  1841. AGLOBAL void openreport(void)
  1842. {   if (asl("~(#?.info)"))
  1843.     {   strcpy(report.output, aslresult);
  1844.         loadreport();
  1845.         if (page == 11)
  1846.         {   updatereportgadgets();
  1847. }   }   }
  1848.  
  1849. AGLOBAL void loadreport(void)
  1850. {   ULONG i;
  1851.  
  1852.     /* parse() returns when it has moved along and found the specified
  1853.        `ending string'. The contents, since last parse(), before the
  1854.        `ending string' are returned in string. */
  1855.  
  1856.     if (readin(report.output))
  1857.     {   offset = 0;
  1858.         parse("# Subject: ");           // skip '# Subject: '
  1859.         parse("\n# Type: ");            // goto end of '\n# Type: '
  1860.         strcpy(report.summary, string);
  1861.         parse("\n# ");
  1862.         if (!strcmp(string, "bug"))
  1863.         {   report.type = BUG;
  1864.         } elif (!strcmp(string, "compat"))
  1865.         {   report.type = COM;
  1866.         } elif (!strcmp(string, "enhancement"))
  1867.         {   report.type = ENH;
  1868.         }
  1869.         if (report.type != COM)
  1870.         {   parse("Subsystem: ");
  1871.             parse("\n");
  1872.             for (i = 0; i <= SUBSYSTEMS; i++)
  1873.             {   if (!strcmp(string, subsystems[i].unfriendly))
  1874.                 {   report.subsystem = i;
  1875.                     break;
  1876.         }   }   }
  1877.         else
  1878.         {   parse("ProductName: ");
  1879.             parse(" (vers=");
  1880.             strcpy(report.thirdname,  string);
  1881.             parse(")\n# ProductInfo: :");
  1882.             strcpy(report.thirdver,   string);
  1883.             parse(":\n");
  1884.             strcpy(report.thirdmanuf, string);
  1885.         }
  1886.         parse("# Severity: ");
  1887.         parse("\n# ");
  1888.         if (!strcmp(string, "a"))
  1889.         {   report.severity = 0;
  1890.         } elif (!strcmp(string, "b"))
  1891.         {   report.severity = 1;
  1892.         } elif (!strcmp(string, "c"))
  1893.         {   report.severity = 2;
  1894.         } elif (!strcmp(string, "ok"))
  1895.         {   report.severity = 3;
  1896.         } elif (!strcmp(string, "e"))
  1897.         {   report.type     = ENH;
  1898.         }
  1899.  
  1900.         if (report.type != ENH)
  1901.         {   parse("Release: KS=");
  1902.             parse(",WB=");
  1903.             strcpy(report.ks, string);
  1904.             if (report.type == BUG)
  1905.             {   parse(",Program=");
  1906.                 strcpy(report.wb, string);
  1907.                 parse("\n");
  1908.                 strcpy(report.pv, string);
  1909.             } else
  1910.             {   // assert(report.type == COM);
  1911.                 parse("\n");
  1912.                 strcpy(report.wb, string);
  1913.                 report.pv[0] = 0;
  1914.             }
  1915.         } else report.pv[0] = 0;
  1916.         parse("# Date: ");
  1917.  
  1918.         // now sender fields
  1919.         parse("# Refer: ");
  1920.         parse(",");
  1921.         strcpy(report.lastname, string);
  1922.         parse(" (");
  1923.         strcpy(report.firstname, string);
  1924.         parse(" ,phone ");
  1925.         strcpy(report.company, string);
  1926.         parse(")\n# Path: ");
  1927.         strcpy(report.phone, string);
  1928.         parse("\n# ReferID: ");
  1929.         strcpy(report.email, string);
  1930.         parse("\n");
  1931.         strcpy(report.developer, string);
  1932.  
  1933.         // now config fields
  1934.         parse("# Config: ");
  1935.     parse(",");
  1936.     report.model = 4;
  1937.     for (i = 0; i <= MODELS; i++)
  1938.     {   if (!stricmp(string, ModelOptions[i]))
  1939.         {   report.model = i;
  1940.                 break; // for speed
  1941.     }   }
  1942.         parse(",A=");
  1943.         report.cpu = 0;
  1944.     for (i = 0; i <= CPUS; i++)
  1945.     {   if (!stricmp(string, CPUOptions[i]))
  1946.         {   report.cpu = i;
  1947.                 break; // for speed
  1948.         }   }
  1949.  
  1950.     parse(",D=");
  1951.     if (!stricmp(string, "AA"))
  1952.         report.agnus = 0;
  1953.     elif (!stricmp(string, "ECS-pal"))
  1954.         report.agnus = 1;
  1955.     elif (!stricmp(string, "ECS"))
  1956.         report.agnus = 2;
  1957.     elif (!stricmp(string, "old-pal"))
  1958.         report.agnus = 3;
  1959.     else /* if (!stricmp(string, "old")) */
  1960.         report.agnus = 4;
  1961.  
  1962.     parse(",RAM=");
  1963.         // We will have here "AA", "ECS" or "old", but we don't use this.
  1964.  
  1965.     parse("megC/");
  1966.     strcpy(report.chipram, string);
  1967.  
  1968.     parse("megF,TD=");
  1969.     strcpy(report.fastram, string);
  1970.  
  1971.     parse(",HD=");
  1972.     report.floppies = atol(string);
  1973.  
  1974.     parse(",");
  1975.     strcpy(report.hard, string);
  1976.  
  1977.     parse("\n");
  1978.         strcpy(report.expansion, string);
  1979.  
  1980.         report.pp[0] = 0;
  1981.  
  1982.         if (report.type == BUG)
  1983.         {   parse("### BRIEF BUG DESCRIPTION:\n");
  1984.             parse("\n### BUG GENERATION PROCEDURE OR EXAMPLE:\n");
  1985.             strcpy(report.textfield[0], string);     // bug description
  1986.             parse("\n### ALSO RUNNING:\n");
  1987.             strcpy(report.textfield[1], string);     // bug procedure
  1988.             parse("\n### IF THIS WORKS DIFFERENTLY ON OTHER VERSIONS "
  1989.                   "OR HARDWARE, EXPLAIN:\n");
  1990.             strcpy(report.debug, string);            // also running
  1991.             parse("\n### RELATED PROBLEMS:\n");
  1992.             strcpy(report.textfield[2], string);     // explain differently
  1993.             parsetoend();
  1994.             strcpy(report.textfield[3], string);     // related problems
  1995.         } elif (report.type == COM)
  1996.         {   if (report.severity != 3)
  1997.             {   parse("### BRIEF BUG DESCRIPTION:\n");
  1998.                 parse("\n### BUG GENERATION PROCEDURE OR EXAMPLE:\n");
  1999.                 strcpy(report.textfield[0], string); // bug description
  2000.                 parse("\n### ALSO RUNNING:\n");
  2001.                 strcpy(report.textfield[1], string); // bug procedure
  2002.                 parse("\n### IF THIS WORKS DIFFERENTLY ON OTHER VERSIONS "
  2003.                       "OR HARDWARE, EXPLAIN:\n");
  2004.                 strcpy(report.debug, string);        // also running
  2005.                 parse("\n### WHAT DEVELOPER IS DOING IN THAT AREA OF SW "
  2006.                       "OR HW:\n");
  2007.                 strcpy(report.textfield[2], string); // explain differently
  2008.                 parse("\n### RELATED PROBLEMS:\n");
  2009.                 strcpy(report.textfield[3], string); // what doing?
  2010.                 parsetoend();
  2011.                 strcpy(report.textfield[4], string); // related problems
  2012.             } else
  2013.             {   parse("### BRIEF BUG DESCRIPTION:\n");
  2014.                 parse("\n### BUG GENERATION PROCEDURE OR EXAMPLE:\n");
  2015.                 strcpy(report.textfield[0], string); // bug description
  2016.                 parse("\n### WHAT DEVELOPER IS DOING IN THAT AREA OF SW "
  2017.                       "OR HW:\n");
  2018.                 strcpy(report.textfield[1], string); // explain differently
  2019.                 parse("\n### RELATED PROBLEMS:\n");
  2020.                 strcpy(report.textfield[2], string); // what doing?
  2021.                 parsetoend();
  2022.                 strcpy(report.textfield[3], string); // related problems
  2023.         }   }
  2024.         else
  2025.         {   // assert(report.type == ENH);
  2026.             parse("### ENHANCEMENT REQUEST:\n");
  2027.             parsetoend();
  2028.             strcpy(report.textfield[0], string);
  2029.         }
  2030.         updatereportgadgets();
  2031. }   }
  2032.  
  2033. /*          # Subject: <subject><LF>
  2034.             # Type: bug|compat|enhancement<LF>
  2035. BUG,ENH     # Subsystem: <subsystem><LF>
  2036. COM         # ProductName: <name> (vers=<version>)
  2037. COM         # ProductInfo: :<manufacturer>:
  2038.             # Severity: a|b|c|ok|e
  2039. BUG         # Release: KS=<version>,WB=<version>,Program=<version>
  2040. COM         # Release: KS=<version>,WB=<version>
  2041.             # Date: <weekday> dd-Mon-yy hh:mm:ss
  2042.             # Refer: <refer>
  2043.             # Path: <path>
  2044.             # ReferID: <referid>
  2045.             # Config: <config>
  2046. BUG,COMa-c  ### BRIEF BUG DESCRIPTION:
  2047. BUG,COMa-c  ### BUG GENERATION PROCEDURE OR EXAMPLE:
  2048. BUG,COM     ### ALSO RUNNING:
  2049.             <debug>
  2050. BUG,COM     ### IF THIS WORKS DIFFERENTLY ON OTHER VERSIONS OR HARDWARE,
  2051.             EXPLAIN:
  2052. COMa-c        ### WHAT DEVELOPER IS DOING IN THAT AREA OF SW OR HW:    
  2053. BUG,COMa-c  ### RELATED PROBLEMS:
  2054. ENH         ### ENHANCEMENT REQUEST: */
  2055.  
  2056. AGLOBAL void report2(void)
  2057. {   struct Hook    Hook1Struct;
  2058.     STRPTR         textBuffer[MAXELEMENTS_1 + 1];
  2059.     TEXT           GadTitle[MAXELEMENTS_1 + 1][VLONGFIELD + 1];
  2060.     ULONG          i, counter, elements;
  2061.     struct TagItem tag_texteditor[4] =
  2062.     { { GA_ID,                    NULL                  }, // ti_Data filled later
  2063.       { GA_RelVerify,             TRUE                  },
  2064.       { GA_TEXTEDITOR_ExportWrap, 75                    },
  2065.       { TAG_END,                  NULL                  }
  2066.     }, tag_subcaption[3] =
  2067.     { { LABEL_Text,               NULL                  }, // ti_Data filled later
  2068.       { LABEL_Justification,      LJ_CENTRE             },
  2069.       { TAG_END,                  NULL                  }
  2070.     }, tag_button[4] =
  2071.     { { GA_ID,                    GID_1_BU1             },
  2072.       { GA_RelVerify,             TRUE                  },
  2073.       { GA_Text,                  (ULONG) "_Other page..."},
  2074.       { TAG_END,                  NULL                  }
  2075.     }, tag_supercaption[7] =
  2076.     { { LAYOUT_Orientation,       LAYOUT_ORIENT_VERT    },
  2077.       { LAYOUT_SpaceOuter,        TRUE                  },
  2078.       { LAYOUT_VertAlignment,     LALIGN_CENTER         },
  2079.       { LAYOUT_HorizAlignment,    LALIGN_CENTER         },
  2080.       { LAYOUT_BevelStyle,        BVS_NONE              },
  2081.       { LAYOUT_AddImage,          NULL                  }, // ti_Data filled later
  2082.       { TAG_END,                  NULL                  }
  2083.     }, tag_onlylayout[24] =
  2084.     { { LAYOUT_Orientation,       LAYOUT_ORIENT_VERT    },
  2085.       { LAYOUT_SpaceOuter,        TRUE                  },
  2086.       { LAYOUT_DeferLayout,       TRUE                  },
  2087.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2088.       { CHILD_WeightedHeight,     0                     },
  2089.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2090.       { CHILD_MinHeight,          80                    },
  2091.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2092.       { CHILD_WeightedHeight,     0                     },
  2093.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2094.       { CHILD_MinHeight,          80                    },
  2095.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2096.       { CHILD_WeightedHeight,     0                     },
  2097.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2098.       { CHILD_MinHeight,          80                    },
  2099.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2100.       { CHILD_WeightedHeight,     0                     },
  2101.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2102.       { CHILD_MinHeight,          80                    },
  2103.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2104.       { CHILD_WeightedHeight,     0                     },
  2105.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2106.       { CHILD_MinHeight,          80                    },
  2107.       { TAG_END,                  NULL                  }
  2108.     }, tag_rootlayout[8] =
  2109.     { { LAYOUT_Orientation,    LAYOUT_ORIENT_VERT    },
  2110.       { LAYOUT_SpaceOuter,     TRUE                  },
  2111.       { LAYOUT_DeferLayout,    TRUE                  },
  2112.       { LAYOUT_AddChild,       NULL                  }, // ti_Data filled later
  2113.       { CHILD_WeightedHeight,  100,                  },
  2114.       { LAYOUT_AddChild,       NULL                  }, // ti_Data filled later
  2115.       { CHILD_WeightedHeight,  0                     },
  2116.       { TAG_END,               NULL                  }
  2117.     }, tag_window[15] =
  2118.     { { WA_PubScreen,          NULL                                            }, // ti_Data filled later
  2119.       { WA_ScreenTitle,        (ULONG) "Report+"                               },
  2120.       { WA_Title,              (ULONG) "Report+: Report Details (Page 2 of 2)" },
  2121.       { WA_Activate,           TRUE                  },
  2122.       { WA_DepthGadget,        TRUE                  },
  2123.       { WA_DragBar,            TRUE                  },
  2124.       { WA_CloseGadget,        TRUE                  },
  2125.       { WA_SizeGadget,         TRUE                  },
  2126.       { WA_IDCMP,              IDCMP_RAWKEY          },
  2127.       { WINDOW_IDCMPHook,      NULL                  }, // ti_Data filled later
  2128.       { WINDOW_IDCMPHookBits,  IDCMP_RAWKEY          },
  2129.       { WINDOW_MenuStrip,      NULL                  }, // ti_Data filled later
  2130.       { WINDOW_Position,       WPOS_CENTERSCREEN     },
  2131.       { WINDOW_ParentGroup,    NULL                  }, // ti_Data filled later
  2132.       { TAG_END,               NULL                  }
  2133.     };
  2134.  
  2135.     switch(report.type)
  2136.     {
  2137.     case BUG:
  2138.         strcpy(GadTitle[0], "Brief bug _description:");
  2139.         strcpy(GadTitle[1], "_Bug generation procedure or example:");
  2140.         strcpy(GadTitle[2], "_If this works differently on other versions or hardware, explain:");
  2141.         strcpy(GadTitle[3], "_Related problems:");
  2142.         elements = 3;
  2143.     break;
  2144.     case COM:
  2145.         if (report.severity == 3)
  2146.         {   strcpy(GadTitle[0], "_If this works differently on other versions or hardware, explain:");
  2147.             elements = 0;
  2148.         } else
  2149.         {   strcpy(GadTitle[0], "Brief bug _description:");
  2150.             strcpy(GadTitle[1], "_Bug generation procedure or example:");
  2151.             strcpy(GadTitle[2], "_If this works differently on other versions or hardware, explain:");
  2152.             strcpy(GadTitle[3], "_What developer is doing in that area of software or hardware:");
  2153.             strcpy(GadTitle[4], "_Related problems:");
  2154.             elements = 4;
  2155.         }
  2156.         break;
  2157.     case ENH:
  2158.         strcpy(GadTitle[0], "_Enhancement request:");
  2159.         elements = 0;
  2160.     break;
  2161.     default:
  2162.     break;
  2163.     }
  2164.  
  2165.     /* window
  2166.         root-layout
  2167.          only-layout
  2168.           super-caption
  2169.            sub-caption
  2170.           texteditor
  2171.          button
  2172.          button */
  2173.  
  2174.     counter = 3;
  2175.     for (i = 0; i <= elements; i++)
  2176.     {   tag_subcaption[0].ti_Data          = (ULONG) GadTitle[i];
  2177.         tag_texteditor[0].ti_Data          = GID_1_TE1 + i;
  2178.         tag_supercaption[5].ti_Data        = (ULONG) NewObjectA(LABEL_GetClass(),      NULL, tag_subcaption);
  2179.         tag_onlylayout[counter].ti_Data    = (ULONG) NewObjectA(LAYOUT_GetClass(),     NULL, tag_supercaption);
  2180.         counter += 2;
  2181.         tag_onlylayout[counter].ti_Data    =
  2182.         report_gadgets[GID_1_TE1 + i]      = (ULONG) NewObjectA(TEXTEDITOR_GetClass(), NULL, tag_texteditor);
  2183.         counter += 2;
  2184.     }
  2185.     tag_onlylayout[counter].ti_Tag         = TAG_END;
  2186.  
  2187.     tag_rootlayout[3].ti_Data   = (ULONG) NewObjectA(LAYOUT_GetClass(), NULL,            tag_onlylayout);
  2188.     tag_rootlayout[5].ti_Data   =
  2189.     report_gadgets[GID_1_BU1]   = (ULONG) NewObjectA(NULL,              "button.gadget", tag_button);
  2190.  
  2191.     tag_window[13].ti_Data      =
  2192.     report_gadgets[GID_1_LY1]   = (ULONG) NewObjectA(LAYOUT_GetClass(), NULL,            tag_rootlayout);
  2193.  
  2194.     InitHook(&Hook1Struct, Hook1Func, NULL);
  2195.     tag_window[9].ti_Data       = &Hook1Struct;
  2196.     lockscreen();
  2197.     tag_window[0].ti_Data       = (ULONG) ScreenPtr;
  2198.     tag_window[11].ti_Data      = MenuPtr;
  2199.     WinObject[1]                = (ULONG) NewObjectA(WINDOW_GetClass(), NULL,             tag_window);
  2200.     unlockscreen();
  2201.     if (!WinObject[1]) // Object creation successful?
  2202.     {   rq("Can't create ReAction objects!");
  2203.     }
  2204.     openwindow();
  2205.  
  2206.     // Do any necessary imports.
  2207.     switch(report.type)
  2208.     {
  2209.     case BUG:
  2210.         SetGadgetAttrs
  2211.         (   report_gadgets[GID_1_TE1], MainWindowPtr, NULL,
  2212.             GA_TEXTEDITOR_Contents,    report.textfield[0]
  2213.         );
  2214.         SetGadgetAttrs
  2215.         (   report_gadgets[GID_1_TE2], MainWindowPtr, NULL,
  2216.             GA_TEXTEDITOR_Contents,    report.textfield[1]
  2217.         );
  2218.         SetGadgetAttrs
  2219.         (   report_gadgets[GID_1_TE3], MainWindowPtr, NULL,
  2220.             GA_TEXTEDITOR_Contents,    report.textfield[2]
  2221.         );
  2222.         SetGadgetAttrs
  2223.         (   report_gadgets[GID_1_TE4], MainWindowPtr, NULL,
  2224.             GA_TEXTEDITOR_Contents,    report.textfield[4]
  2225.         );
  2226.     break;
  2227.     case COM:
  2228.         if (report.severity == 3)
  2229.         {   SetGadgetAttrs
  2230.             (   report_gadgets[GID_1_TE1],         MainWindowPtr, NULL,
  2231.                 GA_TEXTEDITOR_Contents,            report.textfield[2]
  2232.             ); // if this works differently...
  2233.         } else
  2234.         {   for (i = 0; i <= 4; i++)
  2235.             {   SetGadgetAttrs
  2236.                 (   report_gadgets[GID_1_TE1 + i], MainWindowPtr, NULL,
  2237.                     GA_TEXTEDITOR_Contents,        report.textfield[i]
  2238.                 );
  2239.         }   }
  2240.     break;
  2241.     case ENH:
  2242.         SetGadgetAttrs
  2243.         (   report_gadgets[GID_1_TE1], MainWindowPtr, NULL,
  2244.             GA_TEXTEDITOR_Contents,    report.textfield[5]
  2245.         ); // enhancement request
  2246.     break;
  2247.     default:
  2248.         ; // assert(0);
  2249.     break;
  2250.     }
  2251.  
  2252.     /* 0: brief bug description
  2253.        1: bug generation procedure or example
  2254.        2: if this works differently...
  2255.        3: what developer is doing...
  2256.        4: related problems
  2257.        5: enhancement request */
  2258.  
  2259.     ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE1]);
  2260.     loop();
  2261.  
  2262.     for (i = 0; i <= elements; i++)
  2263.     {   textBuffer[i] = (STRPTR) DoGadgetMethod(report_gadgets[GID_1_TE1 + i], MainWindowPtr, NULL, GM_TEXTEDITOR_ExportText, NULL);
  2264.     }
  2265.     switch(report.type)
  2266.     {
  2267.     case BUG:
  2268.         strcpy(report.textfield[0], textBuffer[0]); // brief bug description
  2269.         strcpy(report.textfield[1], textBuffer[1]); // bug generation procedure or example
  2270.         strcpy(report.textfield[2], textBuffer[2]); // if this works differently...
  2271.         strcpy(report.textfield[4], textBuffer[3]); // related problems
  2272.     break;
  2273.     case COM:
  2274.         if (report.severity == 3)
  2275.         {   strcpy(report.textfield[2], textBuffer[0]); // if this works differently...
  2276.         } else
  2277.         {   strcpy(report.textfield[0], textBuffer[0]); // brief bug description
  2278.             strcpy(report.textfield[1], textBuffer[1]); // bug generation procedure or example
  2279.             strcpy(report.textfield[2], textBuffer[2]); // if this works differently...
  2280.             strcpy(report.textfield[3], textBuffer[3]); // what developer is doing...
  2281.             strcpy(report.textfield[4], textBuffer[4]); // related problems
  2282.         }
  2283.     break;
  2284.     case ENH:
  2285.         strcpy(report.textfield[5], textBuffer[0]); // enhancement request
  2286.     break;
  2287.     default:
  2288.         ; // assert(0);
  2289.     break;
  2290.     }
  2291.  
  2292.     for (i = 0; i <= elements; i++)
  2293.     {   FreeVec((APTR) textBuffer[i]);
  2294.         textBuffer[i] = NULL;
  2295.     }
  2296.     closewindow();
  2297. }
  2298.  
  2299. MODULE ULONG Hook1Func(struct Hook *h, VOID *o, VOID *msg)
  2300. {   /* "When the hook is called, the data argument points to the
  2301.     window object and message argument to the IntuiMessage." */
  2302.  
  2303.     UWORD code, qual;
  2304.     ULONG scroll = 0;
  2305.  
  2306.     geta4(); // wait till here before doing anything
  2307.     code = ((struct IntuiMessage *) msg)->Code;
  2308.     qual = ((struct IntuiMessage *) msg)->Qualifier;
  2309.  
  2310.     switch(code)
  2311.     {
  2312.     case SCAN_HELP:
  2313.         helpabout();
  2314.     break;
  2315.     case SCAN_ESCAPE:
  2316.         if (page == 11 && (qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2317.         {   cleanexit(EXIT_SUCCESS); // crashes if direct exit from page 12
  2318.         } else
  2319.         {   page = 0;
  2320.         }
  2321.     break;
  2322.     case SCAN_UP:
  2323.         if (report.type != COM)
  2324.         {   if (qual & IEQUALIFIER_CONTROL)
  2325.             {   scroll = LBP_TOP;
  2326.             } elif (qual & IEQUALIFIER_LSHIFT || qual & IEQUALIFIER_RSHIFT)
  2327.             {   scroll = LBP_PAGEUP;
  2328.             } else scroll = LBP_LINEUP;
  2329.         }
  2330.     break;
  2331.     case SCAN_DOWN:
  2332.         if (report.type != COM)
  2333.         {   if (qual & IEQUALIFIER_CONTROL)
  2334.             {   scroll = LBP_BOTTOM;
  2335.             } elif (qual & IEQUALIFIER_LSHIFT || qual & IEQUALIFIER_RSHIFT)
  2336.             {   scroll = LBP_PAGEDOWN;
  2337.             } else scroll = LBP_LINEDOWN;
  2338.         }
  2339.     break;
  2340.     case SCAN_A:
  2341.         if (page == 11 && report.type == COM)
  2342.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST9]);
  2343.         }
  2344.     break;
  2345.     case SCAN_B:
  2346.         if (page == 12)
  2347.         {   if (report.type == BUG || (report.type == COM && report.severity != 3))
  2348.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE2]);
  2349.         }   } // "_bug generation procedure or example", when present, is always GID_1_TE2.
  2350.     break;
  2351.     case SCAN_C:
  2352.         if (page == 11)
  2353.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST11]);
  2354.         }
  2355.     break;
  2356.     case SCAN_D:
  2357.         if (page == 11)
  2358.         {   if (report.type != ENH)
  2359.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST3]);
  2360.         }   }
  2361.         elif (page == 12)
  2362.         {   if (report.type == BUG || (report.type == COM && report.severity != 3))
  2363.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE1]);
  2364.         }   } // "brief bug _description", when present, is always GID_1_TE1.
  2365.     break;
  2366.     case SCAN_E:
  2367.         if (page == 12 && report.type == ENH)
  2368.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE1]);
  2369.         } // "_enhancement request", when present, is always GID_1_TE1.
  2370.     break;
  2371.     case SCAN_H:
  2372.         if (page == 11)
  2373.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST13]);
  2374.         }
  2375.     break;
  2376.     case SCAN_I:
  2377.         if (page == 11)
  2378.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2379.             {   if (report.agnus == 0)
  2380.                     report.agnus = AGNUSES;
  2381.                 else report.agnus--;
  2382.             } else
  2383.             {   if (report.agnus == AGNUSES)
  2384.                     report.agnus = 0;
  2385.                 else report.agnus++;
  2386.             }
  2387.             SetGadgetAttrs
  2388.             (   report_gadgets[GID_1_CH5], MainWindowPtr, NULL,
  2389.                 CHOOSER_Selected,          report.agnus
  2390.             );
  2391.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH5], MainWindowPtr, NULL);
  2392.         } elif (page == 12)
  2393.         {   if (report.type == BUG || (report.type == COM && report.severity != 3))
  2394.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE3]);
  2395.             } elif (report.type == COM && report.severity == 3)
  2396.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE1]);
  2397.         }   }
  2398.     break;
  2399.     case SCAN_K:
  2400.         if (page == 11 && report.type != ENH)
  2401.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST4]);
  2402.         }
  2403.     break;
  2404.     case SCAN_M:
  2405.         if (page == 11)
  2406.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2407.             {   if (report.model == 0)
  2408.                     report.model = MODELS;
  2409.                 else report.model--;
  2410.             } else
  2411.             {   if (report.model == MODELS)
  2412.                     report.model = 0;
  2413.                 else report.model++;
  2414.             }
  2415.             SetGadgetAttrs
  2416.             (   report_gadgets[GID_1_CH3], MainWindowPtr, NULL,
  2417.                 CHOOSER_Selected,          report.model
  2418.             );
  2419.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH3], MainWindowPtr, NULL);
  2420.         }
  2421.     break;
  2422.     case SCAN_N:
  2423.         if (page == 11)
  2424.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_IN1]);
  2425.         }
  2426.     break;
  2427.     case SCAN_O:
  2428.         if (page == 11 && report.type == BUG)
  2429.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST6]);
  2430.         }
  2431.     break;
  2432.     case SCAN_P:
  2433.         if (page == 11)
  2434.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST7]);
  2435.         }
  2436.     break;
  2437.     case SCAN_R:
  2438.         if (page == 11)
  2439.         {   if (report.type == COM)
  2440.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST8]);
  2441.         }   }
  2442.         elif (page == 12)
  2443.         {   if (report.type == BUG)
  2444.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE4]);
  2445.             } elif (report.type == COM && report.severity != 3)
  2446.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE5]);
  2447.         }   }
  2448.     break;
  2449.     case SCAN_S:
  2450.         if (page == 11)
  2451.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST1]);
  2452.         }
  2453.     break;
  2454.     case SCAN_T:
  2455.         if (page == 11)
  2456.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2457.             {   if (report.type == 0)
  2458.                 {   report.type = 2;
  2459.                 } else report.type--;
  2460.             } else
  2461.             {   if (report.type == 2)
  2462.                 {   report.type = 0;
  2463.                 } else report.type++;
  2464.             }
  2465.             updatereportgadgets();
  2466.         }
  2467.     break;
  2468.     case SCAN_U:
  2469.         if (page == 11)
  2470.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2471.             {   if (report.cpu == 0)
  2472.                     report.cpu = CPUS;
  2473.                 else report.cpu--;
  2474.             } else
  2475.             {   if (report.cpu == CPUS)
  2476.                     report.cpu = 0;
  2477.                 else report.cpu++;
  2478.             }
  2479.             SetGadgetAttrs
  2480.             (   report_gadgets[GID_1_CH4], MainWindowPtr, NULL,
  2481.                 CHOOSER_Selected,          report.cpu
  2482.             );
  2483.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH4], MainWindowPtr, NULL);
  2484.         }
  2485.     break;
  2486.     case SCAN_V:
  2487.         if (page == 11 && report.type == COM)
  2488.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST10]);
  2489.         }
  2490.     break;
  2491.     case SCAN_W:
  2492.         if (page == 11)
  2493.         {   if (report.type != ENH)
  2494.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST5]);
  2495.         }   }
  2496.         elif (page == 12 && report.type == COM && report.severity != 3)
  2497.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE3]);
  2498.         } // "_what developer is doing...", when present, is always GID_1_TE4.
  2499.     break;
  2500.     case SCAN_X:
  2501.         if (page == 11)
  2502.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST14]);
  2503.         }
  2504.     break;
  2505.     case SCAN_Y:
  2506.         if (page == 11 && report.type != ENH)
  2507.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2508.             {   if (report.severity == 0)
  2509.                 {   report.severity = 3;
  2510.                 } else report.severity--;
  2511.             } else
  2512.             {   if (report.severity == 3)
  2513.                 {   report.severity = 0;
  2514.                 } else report.severity++;
  2515.             }
  2516.             if (report.type == BUG && report.severity == 3)
  2517.             {   report.severity = 0;
  2518.             }
  2519.             SetGadgetAttrs
  2520.             (   report_gadgets[GID_1_CH1], MainWindowPtr, NULL,
  2521.                 CHOOSER_Selected,          report.severity
  2522.             );
  2523.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH1], MainWindowPtr, NULL);
  2524.         }
  2525.     break;
  2526.     case SCAN_SLASH:
  2527.         if (page == 11)
  2528.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST12]);
  2529.         }
  2530.     break;
  2531.     case SCAN_PERIOD:
  2532.         if (page == 11 && report.type == BUG)
  2533.         {   if (asl("~(#?.info)"))
  2534.             {   strcpy(report.pp, aslresult);
  2535.                 SetGadgetAttrs
  2536.                 (   report_gadgets[GID_1_ST7], MainWindowPtr, NULL,
  2537.                     STRINGA_TextVal,           report.pp
  2538.                 );
  2539.                 refreshpv();
  2540.         }   }
  2541.     break;
  2542.     default:
  2543.     break;
  2544.     }
  2545.  
  2546.     if (report.type != ENH && (code == SCAN_UP || code == SCAN_DOWN))
  2547.     {   SetGadgetAttrs
  2548.         (   report_gadgets[GID_1_LB1],    // pointer to gadget
  2549.             MainWindowPtr,                // pointer to window (not window object!)
  2550.             NULL,                         // pointer to requester
  2551.             LISTBROWSER_Position, scroll, // tags
  2552.             TAG_DONE                      // done
  2553.         );
  2554.     }
  2555.  
  2556.     return(1);
  2557. }
  2558.  
  2559. MODULE void updateemail(void)
  2560. {   if
  2561.     (   (!stricmp(subsystems[report.subsystem].unfriendly, "wormwars"))
  2562.      || (!stricmp(subsystems[report.subsystem].unfriendly, "report+"))
  2563.      || (!stricmp(subsystems[report.subsystem].unfriendly, "saga"))
  2564.     )
  2565.     {   SetGadgetAttrs
  2566.         (   report_gadgets[GID_1_ST2], MainWindowPtr, NULL,
  2567.             STRINGA_TextVal,           "amigansoftware@abime.net"
  2568.         ); // email to
  2569.     } else
  2570.     {   SetGadgetAttrs
  2571.         (   report_gadgets[GID_1_ST2], MainWindowPtr, NULL,
  2572.             STRINGA_TextVal,           "support@haage-partner.com"
  2573.         ); // email to
  2574. }   }
  2575.